cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-G474RE pwm issue

CJi
Associate II

i am using NUCLEO-G474RE board, TIM1 to output PWM wave, it works fine ,i can see the pwm wave through scope, but when i use

HAL_TIM_PWM_Stop(&htim1, TIM_CHANNEL_3);

HAL_TIMEx_PWMN_Stop(&htim1, TIM_CHANNEL_3);

to stop PWM , there is a attenuated waveform in each PWM output, the board does not connect anything.

in my opinion , the pwm should be shut down immediately, why this happens0690X00000Arj4sQAB.jpg0690X00000Arj4nQAB.jpg

1 REPLY 1
Igor Cesko
ST Employee

Hi CJi ,

The function HAL_TIM_PWM_Stop() set the GPIOs into input (high impedance) mode. Therefore you see the residual voltage on pins (discharging the pin).

Regards

Igor