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.

TMS320F280040-Q1: ePWM Channels A and B shifted (B is Lagged in respect A)

Part Number: TMS320F280040-Q1

Hello folks,

I'm facing a problem with ePWM regarding the synchronization of channels. Channel B is always lagged in respect to channel A about 32ns. I didn't find any note on the Technical Reference Manual about this lag between channels (SPRUI33D v.2020).

Here there is my setup:

EPWM_setPhaseShift (_pwmBaseAdd, 0U);
EPWM_setTimeBaseCounter (_pwmBaseAdd, 0U);
EPWM_setTimeBaseCounterMode (_pwmBaseAdd, EPWM_COUNTER_MODE_UP);

EPWM_setClockPrescaler(_pwmBaseAdd, EPWM_CLOCK_DIVIDER_1, EPWM_HSCLOCK_DIVIDER_8);

/* Channel A*/
EPWM_setActionQualifierAction(_pwmBaseAdd,
                                                     EPWM_AQ_OUTPUT_A,
                                                     EPWM_AQ_OUTPUT_HIGH,
                                                     EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
EPWM_setActionQualifierAction(_pwmBaseAdd,
                                                     EPWM_AQ_OUTPUT_A,
                                                     EPWM_AQ_OUTPUT_LOW,
                                                     EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);

/*Channel B*/
EPWM_setActionQualifierAction(_pwmBaseAdd,
                                                     EPWM_AQ_OUTPUT_B,
                                                     EPWM_AQ_OUTPUT_HIGH,
                                                     EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);

EPWM_setActionQualifierAction(_pwmBaseAdd,
                                                     EPWM_AQ_OUTPUT_B,
                                                     EPWM_AQ_OUTPUT_LOW,
                                                     EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPB);

/*Same CMP value for both channels */

EPWM_setCounterCompareValue(_pwmBaseAdd, EPWM_COUNTER_COMPARE_A, CMPA_aux); 
EPWM_setCounterCompareValue(_pwmBaseAdd, EPWM_COUNTER_COMPARE_B, CMPA_aux);


EPWM_setTimeBasePeriod (_pwmBaseAdd, localTBPRD);

Is this a hardware delay? 

Any help will be much appreciated.