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.

TMS320F28075: Trip Zone interrupt not generating

Part Number: TMS320F28075
Other Parts Discussed in Thread: C2000WARE

Hello,

I am using comparator submodule to generate a trip, which is connected to ePWM tripzone. I have configured trip as one-shot. I see that OST flag is 1 in TZFLG but INT flag stays at 0. I need the interrupt to be generated so that I can set necessary variables in my ISR. Why interrupt is not getting generated? 

Comparator and EPWM initialization.

EALLOW;
/**** Step 1: Enable and configure Compare subsystem. ****/
//Enable CMPSS
Cmpss3Regs.COMPCTL.bit.COMPDACE            = 1;
//NEG signal comes from DAC
Cmpss3Regs.COMPCTL.bit.COMPHSOURCE         = INTERNAL_DAC;
//Use VDDA as the reference for DAC
Cmpss3Regs.COMPDACCTL.bit.SELREF           = REFERENCE_VDDA;
//Set DAC to midpoint for arbitrary reference
Cmpss3Regs.DACHVALS.bit.DACVAL             = 1118;
//Set to typical hysteresis
Cmpss3Regs.COMPHYSCTL.bit.COMPHYS		   = TYPICAL_1x;

/**** Step 2: Configure Digital Filter ****/
//Maximum CLKPRESCALE value provides the most time between samples
Cmpss3Regs.CTRIPHFILCLKCTL.bit.CLKPRESCALE = 0;		// 0 prescale => max resolution (10ns)
//Maximum SAMPWIN value provides largest number of samples
Cmpss3Regs.CTRIPHFILCTL.bit.SAMPWIN        = 13;
//Maximum THRESH value requires static value for entire window
//THRESH should be GREATER than half of SAMPWIN
Cmpss3Regs.CTRIPHFILCTL.bit.THRESH         = 7;

/**** Step 3: Initialize the sample values in the digital FIFO ****/
//Do not use initialization. On reset, all FIFO values would be zeros.
Cmpss3Regs.CTRIPHFILCTL.bit.FILINIT        = 0;

/**** Step 4: Configure CTRIPOUT path ****/	
//Digital filter output feeds CTRIPH and CTRIPOUTH
Cmpss3Regs.COMPCTL.bit.CTRIPHSEL           = CTRIP_FILTER;
Cmpss3Regs.COMPCTL.bit.CTRIPOUTHSEL        = CTRIP_FILTER;

/**** Step 5: Configure ePWM X-bar modules to accept filter output ****/
//Configure TRIP5 to be CTRIP3H
EPwmXbarRegs.TRIP5MUX0TO15CFG.bit.MUX4 = 0;
//Enable TRIP5 Mux for Output
EPwmXbarRegs.TRIP5MUXENABLE.bit.MUX4   = 1;

/**** Step 6: Configure EPWM registers ****/
//Configure EPWM output A & B to go low on trip.
EPwm2Regs.TZCTL.bit.TZA					   = TZ_FORCE_LO;	
EPwm2Regs.TZCTL.bit.TZB					   = TZ_FORCE_LO;
//Configure DCA to be TRIP5
EPwm2Regs.TZDCSEL.bit.DCAEVT1          	   = TZ_DCBH_HI;
EPwm2Regs.DCTRIPSEL.bit.DCAHCOMPSEL    	   = 0x4; 			// Trip5
EPwm2Regs.DCAHTRIPSEL.bit.TRIPINPUT5   	   = 0;				// Single trip input; Not ORed
//Configure DCA as OST
EPwm2Regs.TZSEL.bit.DCAEVT1  	           = 1;				// Enable
//Configure DCA path to be unfiltered & async
EPwm2Regs.DCACTL.bit.EVT1SRCSEL            = DC_EVT1;
EPwm2Regs.DCACTL.bit.EVT1FRCSYNCSEL        = DC_EVT_ASYNC;
// Clear trip flags
EPwm2Regs.TZCLR.bit.OST					   = 1;
EPwm2Regs.TZCLR.bit.INT               	   = 1;
//Enable DCA interrupt
EPwm2Regs.TZEINT.bit.OST	               = 1;
EDIS;