Strange issue with timer pwm in dma mode
Hello,
I'm facing a very strange issue with timer PWM in DMA mode.
I use the PWM channel to send step pulses to a stepping motor in order to free the mcu while the motor is moving, rather than using time consuming delays.
The issue raises when I change the motor speed by changing the PWM frequency.
Changing the PWM frequency breaks the DMA.
What I mean by breaks the DMA is that when I call the start function
if (HAL_TIM_PWM_Start_DMA(THIS->timer, THIS->channel, THIS->burst_buffer, THIS->steps_burst_size) == HAL_OK)
{
osMessageQueueGet(THIS->sync, &_token, 0L, osWaitForever);
}
I always get HAL_OK, but the pulse finished callback is never called.
I change the PWM frequency in a rather rogue way, by writing a new value to the ARR register.
I'm sure that the issue is related to the frequency change, if I comment out the lines changing the frequency, all works well.
To check wether errors are are trigerred or not, I setup a HAL_TIM_ErrorCallback, but it never gets called.
