Showing results for 
Search instead for 
Did you mean: 

STM32F446RE phase-shift modulation for DAB converter which needs 8 pulses, which are in complementary pairs.


I am new to STM32 and I am trying to figure out how to implement my PSM control. I need 8 pulses which are in complementary pairs. I need to use TIM1 for the 2 pairs and TIM8 for the other 2 which are advanced timers. I want phase shift between the first 2 pairs, phase shift between the second 2 pairs and phase shift between the first pair of TIM1 and the first pair of TIM8. From my research it is easy with trigger tim connections to achieve the last one but is hard (or not possible?) to achieve phase shift in the same timer. I have read somewhere with no more information provided that it is possible using (one of the 3 modes of PWM?) the TOGGLE mode (regarding modes PWM1, PWM2, TOGGLE). I cant find anywhere in the documentation such mode. Any solution ?

Associate II

Curious to know the solutions for this.

From my reading of the stm datasheets here is What I have gathered.

Phase Shift: Can be achieved by chaining timers together in master/slave configuration. The master timer output compare can be used to trigger/sync the slave timers. For eg: provide a CCR value of Period/4 in TIM1. TIM2 will start when TIM1 reaches Period/4.

Add a second Output compare output to TIM1 with CCR value of Period/2 and wire it to trig in of TIM3. Now TIM3 will start when TIM1 reaches Period/2.

I was checking the asymmetric PWM mode2 which could kind of provide the phase shift effect for two channels controlled by same timer. I couldnt configure it using the cubeide. The timer application note [AN4013] mentions we can use CCR1+2 and CCR3+4 to specify the phase and pulse duration to get the effect on two channels.

> I was checking the asymmetric PWM mode2

In STM32F446 timers there's no asymmetric PWM mode.