SPRACZ1 October 2021 F29H850TU , F29H859TU-Q1 , TMS320F280021 , TMS320F280021-Q1 , TMS320F280023 , TMS320F280023-Q1 , TMS320F280023C , TMS320F280025 , TMS320F280025-Q1 , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C-Q1 , TMS320F28044 , TMS320F28075 , TMS320F28075-Q1 , TMS320F28076 , TMS320F28374D , TMS320F28374S , TMS320F28375D , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28376D , TMS320F28376S , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28378D , TMS320F28378S , TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S , TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
Take a positive cycle operation as shown in the example, the trip signal (active low) is required to set as CBC trip event, which forces EPWM1A and EPWM1B low and applies to the EPWM2 during negative cycle.
Firstly, the trip signal (EPWM8A, GPIO14) is configured as Digital Compare A High (DCAH) in both the EPWM1 and EPWM2 modules, and the DCAEVT2 event takes effect when DCAH becomes low.
// DCAH = TRIPIN4 = INPUT X-BAR 1 = EPWM8A
EPWM_selectDigitalCompareTripInput(base1, DC_TRIP_system, EPWM_DC_TYPE_DCAH);
// DCAH = Low and DCAL = Don't care, Trigger DCAEVT2 when EPWM8A goes low
EPWM_setTripZoneDigitalCompareEventCondition(base1,EPWM_TZ_DC_OUTPUT_A2,EPWM_TZ_EVENT_DCXH_LOW);
// DCAH = TRIPIN4 = INPUT X-BAR 1 = EPWM8A
EPWM_selectDigitalCompareTripInput(base2, DC_TRIP_system, EPWM_DC_TYPE_DCAH);
// DCAH = Low and DCAL = Don't care, Trigger DCAEVT2 when EPWM8A goes low
EPWM_setTripZoneDigitalCompareEventCondition(base2,EPWM_TZ_DC_OUTPUT_A2,EPWM_TZ_EVENT_DCXH_LOW);
Then, the force to low action is enabled for both EPWM1A and EPWM2A with TZCTL[TZA], while the CBC trip action is ignored for EPWMxB during the initialization. And it will be adjusted according to the positive or negative cycle conditions, see Section 2.6.
EPWM_setTripZoneAction(base1,EPWM_TZ_ACTION_EVENT_TZA,EPWM_TZ_ACTION_LOW);
EPWM_setTripZoneAction(base1,EPWM_TZ_ACTION_EVENT_TZB, EPWM_TZ_ACTION_DISABLE);
EPWM_setTripZoneAction(base2,EPWM_TZ_ACTION_EVENT_TZA,EPWM_TZ_ACTION_LOW);
EPWM_setTripZoneAction(base2,EPWM_TZ_ACTION_EVENT_TZB, EPWM_TZ_ACTION_DISABLE);