This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

phase shift on pwm channels



I am using a F28035 in my application, a quasi resonant converter. The left (EPWM2) and right (EPWM3) legs

of the converter switch at 50% duty cycle. I use the TBPHS3 register of one to create a phase shift between the left and

right legs (EPWM2 is the master).

Everything seems to be working fine except for the very first time that the TBPHS3 register is changed from

0 to whatever value (even 1). At that time, the gate that is shifted (EPMW3) generates two pulses which creates

problems in my control. After this initial moment, everything resumes to normal (including the shifting

function, PI control etc).

Has anyone experienced such problem? Is there a simple solution to it?

  • Hi Amuliu,

    I've seen this.

    The problem is that the two period values for EPWM2 and EPWM3 are the same. Let’s assume that a sync is generated from master to slave on master’s CTR = 0. Also assume that shadow to active load of registers are configured to happen at CTR = 0 and TBPHS = 0, at the start. When TBPHS is changed to a non-zero value, because of master’s CTR = 0 event generating a sync and loading a new (non-zero) TBPHS into the slave CTR, the slave CTR does not hit 0 (only in one cycle during the change). Since the CTR=0 of slave PWM is missed, its shadow to active register loads are missed for one cycle. Any CTR=0 actions are also missed. For the configuration assumed here, this behavior will happen not only at the start but whenever the two periods are equal and the TBPHS is changed to a non-zero value from 0.

    A simple solution to avoid this problem is to program a slave period value that is 1 less than the master’s period value. Remember that slave is going to be synced with the master anyway, so this shouldn’t affect the PWM frequency unless the slave PWM may set/reset at the boundaries of the CTR. If this is not preferred, you may restrict the phase shift value to 1 or greater and still avoid this problem.

     I hope this helps.

    Hrishi

  • Thanks,  Hrishi. It worked like a charm (making the period smaller by 1 on the slave).