cancel
Showing results for 
Search instead for 
Did you mean: 

what whould be the ideal mode to generate a shifted 4-channel PWM for a Phase-Shift Converter?

MK_2019
Associate II

Hello,

what whould be the ideal mode to generate a shifted 4-channel PWM for a Phase-Shift Converter? 

A timing diagram is attached. The Turn-On- times of all switches are equal.

kind regards

Michael

4 REPLIES 4

In the generic STM32 timer you can't generate shifted waveforms at its different channels - the signals are always aligned with the update (rollover) with one of the edges. In some newer STM32 there are timers where outputs can be ANDed together which could be used for such shifting; but that also means a reduced number of output channels.

So, at the end of the day, you'd need to chain master-slave timers. You didn't care to give us the STM32 model you are intending to use, but in many models especially the higher end there may be combinations of 1 master driving 3 slaves simultaneously, available.

I don't Cube and I believe this would be a major pain in the bottom undertaking to implement in Cube, even if certainly possible.

jW

Would probably just DMA a pattern buffer into the GPIO->BSRR, triggered by a timer.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MK_2019
Associate II

Sorry for neglecting the controller type. Iam using STM32F429. Thanks for your answer!

S.Ma
Principal

Take a timer with 4 channels, make the period long enough to time cover all pulses, then program all 4 channels compare values to toggle, get an interrupt every compare match. You should have 2x4 interrupts during one repeat period. Then, if this works, try to use dma in cyclic mode, if availablr, ti relax core time.