Skip to main content
KHarb.1
Senior
April 3, 2024
Solved

No PWM output after switching to STM32G473

I am migrating a project from STM32F373 to STM32G473. I can program the new part successfully, but I don't see PWM . The PWM values are written in user created code and I can read them back via the STLink, so I know that the part at least begins running. I'm not sure if there are new settings that may be defaulting to the wrong values that are preventing outputs. (I see only 0v for PWM) I configured everything via CubeMX and I added the below user code to enable the timer  What might cause me to not see any PWM output?

HAL_TIM_Base_Start(&htim8);
HAL_TIM_PWM_Start(&htim8,TIM_CHANNEL_3);
HAL_TIM_PWM_Start(&htim8,TIM_CHANNEL_4);

 

 

This topic has been closed for replies.
waclawek.jan
waclawek.janBest answer
Super User
April 3, 2024

TIM8 is an Advanced Timer and needs to have TIMx_BDTR.MOE set.

Read out and check/post content of TIM, DAC and relevant GPIO registers.

JW

2 replies

waclawek.jan
waclawek.janBest answer
Super User
April 3, 2024

TIM8 is an Advanced Timer and needs to have TIMx_BDTR.MOE set.

Read out and check/post content of TIM, DAC and relevant GPIO registers.

JW

KHarb.1
KHarb.1Author
Senior
April 3, 2024

I read the MOE bit back via StLink and it shows it set.