2024-11-07 6:46 AM
I want to drive havfbridge with STM32G474. I am going to use TIMx with channel1 and channel2 to create two PWM signals, that are 180° out of phase and with the same PWM % that is limited to 0% < PWM % < 49%. Because tohose signals have max 50% duty cycle and are 180° out of phase, they cant be bot high at once.
I already have code with multiple __HAL_TIM_SET_COMPARE calls, but i heard about Complementary outputs.
I dont find settings for this in my Cube MX , can anyone help? Does STM32G474 have that or only STM32F series?
Here are manuals:
https://www.st.com/resource/en/reference_manual/rm0440-stm32g4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
And pages:
28.3.17 for timers TIM1, TIM8 and TIM20
and
30.4.14 for timers TIM15, TIM16 and TIM17
2025-01-08 3:02 AM
Hello @Miha,
Yes, the STM32G474 does support complementary PWM outputs.
You can refer to the example provided in the STM32G4 Cube package: STM32CubeG4/Projects/NUCLEO-G474RE/Examples/TIM/TIM_ComplementarySignals at master · STMicroelectronics/STM32CubeG4
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.