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/TMS320F28035: something wrong with the CBC function

Part Number: TMS320F28035


Tool/software: Code Composer Studio

hear is the source code of the CBC function,when i test it, the output of pwmxa is forced to low and then output high after one pwm cycle. but epwmxb is always low.Is there any wrong wit my  configureation?

EPwm1Regs.DCTRIPSEL.bit.DCAHCOMPSEL = DC_COMP1OUT; // DCAH = Comparator 1 output
EPwm2Regs.DCTRIPSEL.bit.DCAHCOMPSEL = DC_COMP1OUT; // DCAH = Comparator 1 output

EPwm1Regs.TZDCSEL.bit.DCAEVT2 = TZ_DCBH_HI; // DCAEVT1 = DCAH high(will become active
EPwm2Regs.TZDCSEL.bit.DCAEVT2 = TZ_DCBH_HI; // DCAEVT1 = DCAH high(will become active
// as Comparator output goes high)
EPwm1Regs.DCACTL.bit.EVT2SRCSEL = DC_EVT2; // DCAEVT1 = DCAEVT1 (not filtered)
EPwm1Regs.DCACTL.bit.EVT2FRCSYNCSEL = DC_EVT_ASYNC; // Take async path
EPwm2Regs.DCACTL.bit.EVT2SRCSEL = DC_EVT2; // DCAEVT1 = DCAEVT1 (not filtered)
EPwm2Regs.DCACTL.bit.EVT2FRCSYNCSEL = DC_EVT_ASYNC; // Take async path

// DCxEVT2 events can be defined as cycle-by-cycle.
EPwm1Regs.TZSEL.bit.DCAEVT2 = 1;
EPwm2Regs.TZSEL.bit.DCAEVT2 = 1;

EPwm1Regs.TZCTL.bit.TZA = TZ_FORCE_LO; // EPWMxA will go low
EPwm1Regs.TZCTL.bit.TZB = TZ_FORCE_LO; // EPWMxB will go low
EPwm2Regs.TZCTL.bit.TZA = TZ_FORCE_LO; // EPWMxA will go low
EPwm2Regs.TZCTL.bit.TZB = TZ_FORCE_LO; // EPWMxB will go low