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.

TMS320F28379D: how to synchronize EPWM1 using extern signal?

Part Number: TMS320F28379D


Hi TI,

I am confused about synchronizing the EPWM1 module of F28379D. As can be seen from Figure 15.7 in the TRM, EXTSYNCIN1 is always connected to EPWM1. EXTSYNCIN1 is sourced from INPUTXBAR5. The INPUTXBAR5 is connected to GPIO0 on default. Does this mean EPWM1 is always syncronized by the signal on GPIO0? What if EPWM1A is enabled with duty cycle as 50%? Will the EPWM1 be always syncronized by EPWM1A? I suppose the answer is no, but why? How to configure the extern syncronization for EPWM1 properly?

Best regards.

  • Hi Jiaxing,

    If you would like to synchronize EPWM1 to an external signal here are the steps:

    1. Configure the sync source. You are correct that EPWM1 is getting connected to EXTSYNCIN1 which is routed to INPUTXBAR5. GPIO0 is by default selected for INPUT5, but you can change this by modifying the INPUT5SELECT register to be another GPIO.

    2. Enable phase shift loading (PHSEN bit of TBCTL register). By default this is set to 0 so EPWM1 will not be synchronized to EXTSYNCIN1 by default. Once enabled, the EPWM1 counter will be loaded from the phase register (TBPHS) and shadow to active load events will occur when an EPWMxSYNCI input signal occurs.

    3. Change the value of the phase register (TBPHS) if needed by your application.

    Best Regards,

    Marlyn