Skip to main content
MK_2019
Associate II
January 23, 2019
Question

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

  • January 23, 2019
  • 4 replies
  • 1918 views

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

This topic has been closed for replies.

4 replies

waclawek.jan
Super User
January 23, 2019

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

Tesla DeLorean
Guru
January 23, 2019

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

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
MK_2019
MK_2019Author
Associate II
January 23, 2019

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

S.Ma
Principal
January 23, 2019

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.