cancel
Showing results for 
Search instead for 
Did you mean: 

Combined PWM mode STM32F334

Bazalt
Associate

I need to generate two phase shifted asymmetric clock signals.

This should probably be done using Combined PWM mode.

What I need

Basic clock in TIMx_ARR for simplicity 4MHz , pin 1 with PWM1 , pin 2 with PWM2

Clock 1 2 3 4 1 2

PWM1 1 0 0 0 1 0

PWM2 0 0 1 0 0 0

PWM 1 has a duty cycle of 1 to 3 first clock tick is 1 and next three 0

PWM 2 is the same but phase shifted by 180 degrees i.e 2 clock period

Can this be achieved using Combined PWM mode?

Exactly how do I have to set the counter, I admit that I don't do very well.

Thansk all

P-S. A key feature is the precise 180-degree phase shift between the rising ramps of PWM1 and PWM2,

0 REPLIES 0