cancel
Showing results for 
Search instead for 
Did you mean: 

Hi everyone, I am fairly new to ST and I'm working on a project where i need 8 phase shifted pwm signals(each phase shifted by 45 degrees and same duty cycle)

Vbhus
Associate

i was thinking if there is a way i could generate 4 timers phase shifted by 90 degrees wrt each other so that i could use them to generate 2 pwm signals (on each timer using asymmetric mode) . can this be done? if not, is there any other way i could do it? 

2 REPLIES 2
flyer31
Senior

8 signals with 45° should also be possible with 4 times, if you use as well the positive and the negative output (many of STM32 timers have this, at least T1,T8,T2-T5... so these are already 6, but also more - see best the timer list in the datasheet for "inverted output"). To create the phase shift connections, you need the SMCR registers (slave mode). Not ALL timers support slave mode, but most of them, again see this list in the datasheet (at least T1,T8,T2...T5, but also more...). Just before you design your PCB, you have to be careful how the timers can be used in master-slave ... not every timer can be used as slave for any timer ... see the connection possibilities in the SMCR register descriptions for the corresponding timers, this is a bit tricky, you have to fiddle this out .. .

With the HRTIM I have no experience, but possibly it works already with HRTIM ... there is a special application note available how to use HRTIM.

S.Ma
Principal

Not very clear what needs to be generated in the end. Just know that using DMA on compare registers it is possible to generate a burst of pulses, possibly through more than 1 channel (done for single channel). You can even define a period which is twice or 3x larger if you want these pulses to shift around.