Hi Kris-san,
There is an additional question for the resolved thread.
https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/624205/2324116
【Question 1】
If EPwm2Regs.TBCTL.bit.PHSDIR = TB_UP is set, it seems to be (direction in which PWM2 moves toward PWM1).
PWM2A = Low / PWM2B = High
→ When actually checking, there was no skip cycle.
From this, it seems that skip cycle will occur only when EPwm2Regs.TBCTL.bit.PHSDIR = TB_DOWN.
【Question 2】
When set to Up Mode or Down Mode, set TBPRD = 0x02C0E100 (set the same frequency as in UpdownMode).
· When TBPHS = 0x00000000 (no deviation),
PWM2A = Low / PWM2B = High
· When TBPHS = 0x015FF000 (180 [deg] shift),
PWM2A = High / PWM2B = Low remains
Or, it seems that it may not occur in Up Mode because skip cycle occurs only in Down Mode.
→ This is unconfirmed.
Is it a occur skip cycle only when Up-Down Mode and PHSDIR = TB_DOWN?
Even in other operation modes it is a phenomenon occurring depending on the SYNC signal and the rise / fall timing of PWM2?
In the sample project, it is for debugging that the TBPHS register is written at about 3 MHz cycle.
Normally, it is written at the depending timing of PWM update.
for (;;)
{
GpioDataRegs.GPBTOGGLE.bit.GPIO 34 = 1;
EALLOW;
EPwm2Regs.TBPHS.all = uiDebug_TBPHS_ePWM2;
EDIS;
}
Best regards,
Maekawa