Ondřej Dušek
Ondřej Dušek

Reputation: 13

Finished DMA doesn't call PulseFinishedCallback when using FreeRTOS

I am trying to send data to PWM through DMA just once. It works fine in normal superloop, but when I'm using FreeRTOS the DMA doesn't call HAL_TIM_PWM_PulseFinishedCallback

  HAL_TIM_PWM_Start_DMA(&htim4, TIM_CHANNEL_3, (uint32_t *)pwmData, indx);
void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim)
{
  if (htim->Instance == TIM4){
    HAL_TIM_PWM_Stop_DMA(&htim4, TIM_CHANNEL_3);
  }
}

When not using FreeRTOS it works. With it, it breaks and DMA nonstop sends the last data from pwmData.

Upvotes: 0

Views: 35

Answers (0)

Related Questions