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.

AM2634-Q1: EPWM Sync and Phaseshift

Part Number: AM2634-Q1

We have configured the AM263 for 6 PWM pairs, each 60 degrees out of phase with the others.  Our EPWM TimeBase period to 2000.  We configured EPWM0 as the sync signal with the other 5 PWM pairs.

This is an example of our setup:

Requirement: Phaseshift of 240degrees between two EPWM channels

               TB period = 2000

               EPWM0 SyncOut at CTR = 0

               EPWM1 SyncIn = EPWM0 SyncOut

               EPWM1 Phaseshift = 1333

Result:

We get unexpected behaviour in EPWM1, as it randomly misses the period.  We also notice unexpected toggling of PWM outputs.

Workaround:

If we change the phase shift = 1225 (i.e., equivalent of 220 degrees), then it works as expected.

Questions:

  1. Is there any limitation on the value used to set "Phaseshift"?
  2. Is there any limitation on the number of the EPWM channels that can use EPWM0 SyncOut as their SyncIn?
  • Hi Tim,

    I checked with the internal team and there is no limitation for PhaseShift or for SyncOut. This seems to be like a Race Condition in triggering the PWM outputs.

    Will look into it and get back shortly

    Regards

    Sri Vidya

  • Hi

    The root cause for this issue is identified to be due to no latch path.

    There are two configurations in EPWM to assign a source to latch and clear the latch.

    One of the configurations is through TripZone, this trips both ePWMA and ePWMB same.

    This can be configured through the following APIs:

    EPWM_enableTripZoneSignals --> select the Trip zone source
    EPWM_selectCycleByCycleTripZoneClearEvent -> To configure when to clear the latch.

    Another configuration is done through Digital Compare Module:

    This can be configured through the following APIs:

    EPWM_setDigitalCompareCBCLatchMode --> select the Trip zone source
    EPWM_selectDigitalCompareCBCLatchClearEvent-> To configure when to clear the latch.
    Regards
    Sri Vidya