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.

CCS/TMS320F28377D: How to write the code to make ePWM4 syn. with ePWM1

Part Number: TMS320F28377D

Tool/software: Code Composer Studio

Hi,

Can anyone tell me where to get the ???? to make ePWM4 syn. with ePWM1? What should I put here for ????. ?

????.SYNCSELECT.bit.EPWM4SYNCIN=0;   //000: EPWM1SYNCOUT selected

  • Hey Hongmei,

    Each ePWM has can use the sync signal coming into it and can pass out a sync signal from multiple sources:

    • For ePWM1 you want to configure the sync signal to come out on some event (e.g. CTR = 0)
    • You need to configure the SYNCSELEOWM4SYNCIN mux to pass ePWM1 sync signal to ePWM4 sync input
    • You need to configure some event in ePWM4 to use the sync. signal (e.g. load the phase when the sync signal is received).  

    Note that an ePWM module can pass the signal through as well, so if you wanted to sync ePWM1 and ePMW3, you'd do something like:

    • For ePWM1 you want to configure the sync signal to come out on some event (e.g. CTR = 0)
    • For ePWM2 you configure the module to pass the sync signal from input to output (but not use the signal to do anything)
    • You need to configure some event in ePWM3 to use the sync. signal 

  • Thank you very much, Devin.

    You need to configure the SYNCSELEOWM4SYNCIN mux to pass ePWM1 sync signal to ePWM4 sync input.

    How to write this code to pass ePWM1 sync signal to ePWM4 sync input in 28377D?

    SyncSocRegs.SYNCSELECT.bit.EPWM4SYNCIN=0;  I am not sure because of Soc in it.

    Thanks!

  • Hi Hongmei,

    That appears to be the correct bit and setting. You can confirm this by looking at the TRM (www.ti.com/.../spruhm8g.pdf) register definitions in section "14.14.4 SYNC_SOC_REGS Registers".