2020-06-23 04:09 AM
Hello,
I am observing a strange behaviour of the first few PWM pulses after a change in duty cycle. I use HAL_TIM_PWM_Stop, HAL_TIM_ConfigChannel (with the changed Pulse) and then HAL_TIM_PWM_Start. What happens is that for around 1 millisecond the pulses are with a strange form (see attached file). If I directly change the CCRx register there is no problem. I try to understand what is happening.
MCU used - STM32F429.
Best regards,
John
2020-06-24 02:16 PM
Can you please post a minimal but complete compilable code exhibiting the problem, to be possibly reproduced elsewhere?
Ideally, if you can get rid of Cube/HAL, using registers directly.
JW