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.

TMS320F280049C: CMPSS configuration to us RAMP shuts down the EPWM output

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE

I have a power electronics project in which I configured the EPWM to use trip combination input (from one shot trip for protection and cycle by cycle trip for Peak current mode control).  The EPWM works well with the one shot trip from the CMPSS but when I included the configuration code of the cycle by cycle trip for PCMC the EPWM does not give any output again.  When I comment out the code for the initialisation of the CMPSS for the PCMC, the ePWM works well and I can see the ouput at the oscilloscope.  Please what can be the problem.  

The configuration code for my CMPSS for the PCMC is below:

void hw_cmpss::IDC2DCCPCMCInit(void)
{

SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS1);

/**< Enable CMPSS and configure the negative input signal to come from the DAC */
CMPSS_enableModule(CMPSS1_BASE);
CMPSS_configHighComparator(CMPSS1_BASE, CMPSS_INSRC_DAC);

/**< Select positive input of CMPSSH to come from to come from pin 9 CMPSSH1.0*/
ASysCtl_selectCMPHPMux(ASYSCTL_CMPHPMUX_SELECT_1, 0); //TODO verify values


/**< Use VDDA as the reference for the DAC and set DAC value to midpoint for arbitrary reference */
CMPSS_configDAC(CMPSS1_BASE, CMPSS_DACREF_VDDA | CMPSS_DACVAL_SYSCLK | CMPSS_DACSRC_RAMP);

/**< DAC initilization */
//CMPSS_setMaxRampValue(CMPSS1_BASE, RAMP_MAX_VALUE);
CMPSS_configRamp (CMPSS1_BASE, RAMP_MAX_VALUE, RAMP_DEC_VALUE, RAMP_DELAY_VALUE, RAMP_PWM_SYNC_SRC, USE_RAMP_VAL_SHDW);

//CMPSS_setDACValueHigh(CMPSS1_BASE, 2048);


/**< Configure digital filter. For this example, the maxiumum values will be */
/**< used for the clock prescale, sample window size, and threshold. */
//CMPSS_configFilterHigh(CMPSS1_BASE, 0x3FF, 32, 31);

/**< Initialize the filter logic and start filtering */
// CMPSS_initFilterHigh(CMPSS1_BASE);
//
// /**< Configure the output signals. CTRIPH will be fed to the output */
CMPSS_configOutputsHigh(CMPSS1_BASE, CMPSS_TRIP_ASYNC_COMP);
//
// /**< clear all latched comparator event */
// CMPSS_clearFilterLatchHigh(CMPSS1_BASE);

/**< Setup the Output X-BAR to output CTRIP on OUTPUTXBAR! */
XBAR_setEPWMMuxConfig(XBAR_TRIP8, XBAR_EPWM_MUX00_CMPSS1_CTRIPH);
XBAR_enableEPWMMux(XBAR_TRIP8, XBAR_MUX00);


// CMPSS_configBlanking (CMPSS1_BASE, RAMP_BLANCH_VALUE);
// CMPSS_enableBlanking (CMPSS1_BASE);
}  

The constant variables are below:

#define CHARG_OC_VALUE 3723u //trip at 3volt
#define BATT_OC_VALUE 3723u //trip at 3volt

#define RAMP_DEC_VALUE 20u
#define RAMP_MAX_VALUE 512u
#define RAMP_BLANCH_VALUE 999u
#define RAMP_DELAY_VALUE 20u
#define RAMP_PWM_SYNC_SRC 1u
#define USE_RAMP_VAL_SHDW 1u

The configuration of my ePWM that relates to the combine trip is below:

Interrupt_register(INT_EPWM2_TZ, &epwm::ISRPCMCCBCTrip);

EPWM_setTripZoneAction(EPWM2_BASE, EPWM_TZ_ACTION_EVENT_DCAEVT1, EPWM_TZ_ACTION_LOW); //TODO verify
EPWM_setTripZoneAction(EPWM2_BASE, EPWM_TZ_ACTION_EVENT_DCBEVT1, EPWM_TZ_ACTION_LOW);

EPWM_setTripZoneAction(EPWM2_BASE, EPWM_TZ_ACTION_EVENT_DCAEVT2, EPWM_TZ_ACTION_LOW); //TODO verify
EPWM_setTripZoneAction(EPWM2_BASE, EPWM_TZ_ACTION_EVENT_DCBEVT2, EPWM_TZ_ACTION_HIGH);

/**< configure trip zone action for DCAEVT1, DCBEVT1 and DCAEVT2, DCBEVT2 trigger when it is high */
EPWM_setTripZoneDigitalCompareEventCondition (EPWM2_BASE, EPWM_TZ_DC_OUTPUT_A1, EPWM_TZ_EVENT_DCXH_HIGH);
EPWM_setTripZoneDigitalCompareEventCondition (EPWM2_BASE, EPWM_TZ_DC_OUTPUT_B1, EPWM_TZ_EVENT_DCXH_HIGH); // verify

EPWM_setTripZoneDigitalCompareEventCondition (EPWM2_BASE, EPWM_TZ_DC_OUTPUT_A2, EPWM_TZ_EVENT_DCXH_HIGH);
EPWM_setTripZoneDigitalCompareEventCondition (EPWM2_BASE, EPWM_TZ_DC_OUTPUT_B2, EPWM_TZ_EVENT_DCXH_HIGH); // verify

/**< Configure DCAH and DCBH to use trip4 and trip5 and trip8 */
//combine trip4 and trip5 and trip8
EPWM_selectDigitalCompareTripInput(EPWM2_BASE, EPWM_DC_TRIP_COMBINATION, EPWM_DC_TYPE_DCAH);
EPWM_selectDigitalCompareTripInput(EPWM2_BASE, EPWM_DC_TRIP_COMBINATION, EPWM_DC_TYPE_DCBH);

//trip4
EPWM_enableDigitalCompareTripCombinationInput(EPWM2_BASE, EPWM_DC_COMBINATIONAL_TRIPIN4, EPWM_DC_TYPE_DCAH);
EPWM_enableDigitalCompareTripCombinationInput(EPWM2_BASE, EPWM_DC_COMBINATIONAL_TRIPIN4, EPWM_DC_TYPE_DCBH);

//trip5
EPWM_enableDigitalCompareTripCombinationInput(EPWM2_BASE, EPWM_DC_COMBINATIONAL_TRIPIN5, EPWM_DC_TYPE_DCAH);
EPWM_enableDigitalCompareTripCombinationInput(EPWM2_BASE, EPWM_DC_COMBINATIONAL_TRIPIN5, EPWM_DC_TYPE_DCBH);

//trip8
EPWM_enableDigitalCompareTripCombinationInput(EPWM2_BASE, EPWM_DC_COMBINATIONAL_TRIPIN8, EPWM_DC_TYPE_DCAH); //TODO for PMCM
EPWM_enableDigitalCompareTripCombinationInput(EPWM2_BASE, EPWM_DC_COMBINATIONAL_TRIPIN8, EPWM_DC_TYPE_DCBH);

/**< enable trip zone signal for DCAEVT1 and DCBEVT1 and for one short tripping */
EPWM_enableTripZoneSignals(EPWM2_BASE, EPWM_TZ_SIGNAL_DCAEVT1 | EPWM_TZ_SIGNAL_DCBEVT1);
EPWM_enableTripZoneSignals(EPWM2_BASE, EPWM_TZ_SIGNAL_DCAEVT2 | EPWM_TZ_SIGNAL_DCBEVT2);

/**< configure for unfiltered and asynchronous operation */
EPWM_setDigitalCompareEventSource(EPWM2_BASE, EPWM_DC_MODULE_A, EPWM_DC_EVENT_1, EPWM_DC_EVENT_SOURCE_ORIG_SIGNAL);
EPWM_setDigitalCompareEventSource(EPWM2_BASE, EPWM_DC_MODULE_B, EPWM_DC_EVENT_1, EPWM_DC_EVENT_SOURCE_ORIG_SIGNAL); //TODO verify
EPWM_setDigitalCompareEventSource(EPWM2_BASE, EPWM_DC_MODULE_A, EPWM_DC_EVENT_2, EPWM_DC_EVENT_SOURCE_ORIG_SIGNAL);
EPWM_setDigitalCompareEventSource(EPWM2_BASE, EPWM_DC_MODULE_B, EPWM_DC_EVENT_2, EPWM_DC_EVENT_SOURCE_ORIG_SIGNAL); //TODO verify

Pls what can be the reason for this problem.

Thanks