cancel
Showing results for 
Search instead for 
Did you mean: 

To Create Three PWM signals using one TIM1 with 120 phase shift

sunilchowdary_19
Associate II

Hello,

I'm using a STM32F303RE to create the PWM signals.

I need to have 3 PWM signals plus their complementary outputs with same pulsewidth and a phaseshift of 120° between them, see picture below.

Hands-On with STM32 Timers: Internal Triggering System, three timers are used via master-slave mode to get this done.

How  to create these three signals with one Timer, for example TIM1 and use CH1-CH3 and their complementary outputs?

Thanks!

2 REPLIES 2
Danish1
Lead II

I do not know if it is possible.

But your best bet is to start by reading the Reference Manual for your stm32, the section on Advanced-control Timers.

My suspicion is that pwm mode will let you program one edge for each of the channels, but the other edge is likely to be when the timer's counter wraps around. So they won't be equal width.

Sarra.S
ST Employee

Hello @sunilchowdary_19,

I don't think it's possible to generate 3 phase-shifted PWM outputs within one timer, due to the shared base frequency determined by the timer's count rate and period, so, when different frequencies are involved you want to use a different TIM!

It is still possible to generate this on two or three mutually master-slave linked timers.

 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.