cancel
Showing results for 
Search instead for 
Did you mean: 

8 Phase shifted Pwm signals with the same duty cycle on stm32 h7

Vbhus
Associate

HI,

Im trying to get 8 phase shifted pwm signals with the same duty cycle using stm32h7. i have tried multiple options but none seem to work for 8 signals. is there a way i can do this.

latest i was trying to trigger 4 timers using 4 phase shifted signals as external trigger so that i can get 4 phase shifted timers. I'm using external clock source mode 1 to do this. but according to the tests triggering the timers with phase shifted signals doesn't necessarily give phase shifted timers.

basically the idea was to trigger 4 timers with 90 deg phase shift so that i can have 2 signals with 180 deg shift on each timer that'll give me 8 signals shifted by 45 deg in total.

is there another way to do this??

Thanks in advance,

Vinay.

3 REPLIES 3

> i was trying to trigger 4 timers using 4 phase shifted signals as external trigger so that i can get 4 phase shifted timers.

> I'm using external clock source mode 1 to do this

I wonder how that could possibly work.

JW

Piranha
Chief II

This could be done by using two timer output channels in toggle mode and putting AND and NOR 2-input logic gates between channels. That way one can get two identical width 180 deg phase shifted PWM signals. Therefore 8 signals can be generated by two synchronized 4-channel timers and a pair of quad 2-input AND and NOR logic gates.

http://www.micromouseonline.com/2016/02/05/clock-pulses-with-variable-phase-stm32/

Though this solution would require quite accurate and careful programming...

Piranha
Chief II

By the way... HRTIM seems to be capable of multi-phase PWM on 5 complementary output pairs with dead-time. Look at AN4539, especially section 7.