cancel
Showing results for 
Search instead for 
Did you mean: 

After stopping a PWM Output (HAL_TIM_PWM_Stop) the signal is slowly decreasing instead of switching instantly to low (0 Volt).

BKarl
Associate II
 
2 REPLIES 2

That function probably disables the PWM through clearing TIMx_CCER.CCyE, which threestates the output.

Change mode from PWM to one of the Forced in repective TIMx_CCMRz.OCyM.

I don't Cube/HAL.

JW

quintanabarcia.pablo
Associate II

I know that if you put duty = 0 with the HAL function, the stop is immediate. I haven't tried any other method at all. It seems waclwek.jan is right and the output remains in three-state for a while.