Part Number: TMS320F280039C
Hello,
CCS Version: 12.4.0.00007
Best regard
Hojoong Kang
Part Number: TMS320F280039C
Hello,
CCS Version: 12.4.0.00007
Best regard
Hojoong Kang
Hi Hojoong,
With TBCTL[PHSEN] = 0, EPWM1's time-base counter never loads TBPHS from the SYNC pulse — PHSEN is the enable bit that allows the EPWMxSYNCI event to actually load the phase register into the active counter 1. The TRM confirms this explicitly:
"The SYNCEVT signal is only propagated through when PHSEN is SET." 1
So, with PHSEN=0, EPWM1's counter free-runs independently once started. Even if both EPWM3 and EPWM1 are configured for the exact same TBPRD, any sub-cycle difference in start time, clock domain crossing delay, or rounding will cause the two counters to drift apart over time — this drift is exactly the "jitter" you're observing. Global load (GLDCTL/GLDCFG) only controls when shadow→active register transfers happen for registers like TBPRD/CMPx — it does not re-synchronize the time-base counter itself. Only the SYNCI→TBPHS load (gated by PHSEN) does that.
When PHSEN=1, every SYNCOUT pulse from EPWM3 forces EPWM1's counter to reload TBPHS, continuously correcting any accumulated drift. This is the intended mechanism for maintaining tight phase lock between a master and slave ePWM — not an optional feature you can bypass with global load alone.
EPwm1Regs.EPWMXLINK.bit.GLDCTL2LINK = 2U; // EPWM1 GLDCTL2 follows EPWM3
EPwm1Regs.GLDCTL.bit.GLDMODE = 4U; // Global load on EPWM3 SYNC
This setup governs register content updates (e.g., simultaneous CMPA/TBPRD loading across EPWM3 and EPWM1), as described in the global load documentation 2 3. It is a complementary mechanism to time-base sync, but it is not a substitute for PHSEN when your goal is counter-level phase alignment. This is likely why you see "most" jitter removed by PHSEN=1 but believe global load alone should be sufficient — the two features solve different problems:
| Feature | Controls |
|---|---|
TBCTL[PHSEN] + SYNCI |
Loads TBPHS into the active time-base counter — corrects phase drift |
GLDCTL/GLDCFG + EPWMXLINK |
Synchronizes shadow→active transfer timing for registers (TBPRD, CMPx, etc.) across modules |
Per the TRM and TI reference designs (e.g., TIDA-00961 pattern) 4, if tight phase lock between EPWM3 (master) and EPWM1 (slave) is required, keep TBCTL[PHSEN] = 1 on EPWM1 so the SYNCI event continuously corrects the counter. Use global load/link registers for your register-content synchronization needs (CMPA, TBPRD, etc.), but don't rely on them for counter phase correction.
Best Regards,
Zackary Fleenor