Can I offset ePWM units by 1/3 period?

I'm trying to shift the PWM waveforms for ePWM1A, ePWM2A, and ePWM3A by 1/3 period with each other. Do you guys know how to do this?

sachingaikwad's picture

Epwm in picoolo 28069

i have same problem with epwm . i want the unit 2 epwm will be phase shifted with refernce to the 1 unit of epwm . but i change in 2 unit epwm setting it also change my 1 unit epwm. i want 1 unit constant and change in only phase of unit 2 . help me thanks ...............

sachin gaikwad

Of course we do.

Each PWM unit has it's own free running counter. Fortunately for you, each PWM unit can be daisy chained to the next unit to synchronize it. You do this by configuring unit n to send a sync pulse output to unit n+1. The sync pulse sent by unit n can be used by unit n+1 to trigger a phase register load to its PWM counter. This has the effect of setting a phase relation between PWM units. VisSim lets you smoothly modulate the phase or use a fixed phase offset. The Time Base portion of the ePWM configuration lets you set this up. The phase register is called TBPHS (Time Base Phase). Check the option TBCTR=TBPHS on SYNCI pulse, this means that the ePWM counter will be set to value in the TBPHS register when the sync in pulse arrives.
ePWM Time Base
The above setting assigns the value 10000 to the PWM Unit 2 counter when a SYNCI Input pulse occurs. Because we are in up/down count mode, the effective period of the PWM unit is 30000. A phase offset of 10000 will have the effect of offsetting unit 2 by 1/3 full PWM period from Unit 1. EPWMSYNO is set to send a pulse to PWM unit 3 when TBCTR = zero. If unit 3 is configured similarly to unit 2, then it will be offset an additional 1/3 period from unit 2.