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: Synchronization for PWM channels

Part Number: TMS320F28379D

Hi,

I want to sync PWMs 4 and 5 to an external signal EXTSYNCIN2. I am confused about this figure from technical reference manual (page 1876, fig 15-7). How do we set up EPWM 4 to synchronize with EXTSYNCIN2, given that there is MUX with multiple options? 

Thanks

  • Hello,

    In regards to Figure 15-7, the figure shows that EXTSYNCIN2 can be selected as the sync source for EPWM4 by configuring the mux using specified register bits to control the EPWM4 sync source. It also shows how EPWM5 is synced to EPWM4 by default (so long as the PWM5 phase shift load setting is enabled, which I refer to later in this post). I've highlighted your desired sync path in blue:

    Also note that the register used to route EXTSYNCIN2 to EPWM4 is listed in the figure as well, which is SYNCSELEPWM4SYNCIN. This register table can be found by first going to the SYNC_SOC_REGS registers on page 2110 of the technical reference manual:

    and then clicking on the SYNCSELECT register section. The SYNCSELECT register table shows the EPWM4SYNCIN description on page 2113 of the technical reference manual:

    You can see here how you can select EXTSYNCIN2 as the sync input source for EPWM4. Once you've set EXTSYNCIN2 as the sync input source for EPWM4, you can ensure that your EPWM5 is synced to EPWM4 by enabling the timebase phase shift using TBCTL[PHSEN] as described on page 2036:

    If you need a perfect sync for EPWM 4 and 5, be sure to also read the note just below Figure 15-7 under the section "EPWMxSYNCI: Synchronization Input Pulse:".

    Let me know if you have any further questions on this!

    Regards,

    Allison

  • That makes sense. Thanks a lot!