STM32F030F4P6 - PWM output voltage
I am working on a project to replace a legacy ST62 IC in a industrial charger 24V/45A charger with an STM32 microcontroller (STM32F0 series). The main issue is with the PWM signal generation using TIM1 and TIM3. Both timers have 16-bit prescalers (value 0 to 65535), and I need to generate a PWM at 1 kHz with about 1000 steps of resolution.
My timer clock is 8 MHz. Based on calculations, prescaler and ARR values can generate correct frequencies, but the PWM output voltage is only around 2.7V instead of the expected 5V, and there is no effective voltage output for charging.
I suspect this issue is linked to the STM32CubeMX pinout or timer configuration:
Correct PA6 pin configuration for TIM3 PWM output.
Proper timer frequency setup: prescaler around 725 with ARR 0 tested, but PWM not as expected.
Possible problem in software initialization or timer start sequence affecting PWM output.
Relay control pins and PWM outputs may not be correctly activated or sequenced.
I have tested a new STM32 board without programming, same issue persists, suggesting it’s not hardware damage but configuration.
Would appreciate help reviewing timer config, pin assignments, and software steps to properly initialize and start PWM on TIM1/TIM3 for reliable voltage output.
