Other Parts Discussed in Thread: C2000WARE
The example is from the C2000Ware_3_04_00_00, the location of it is as follows:
...\TI\C2000\C2000Ware_1_00_03_00\driverlib\f28004x\examples\epwm\epwm_ex1_trip_zone.c
The following code told me if I want to re-enable the OST Interrupt, just uncomment the below code.
I have tried it in many ways, but failed, I can never enter into the OST Interrupt second time.
Ways I have tried:
1, commented the epwm2TZISR and INT_EPWM2_TZ.
2, change the EPWM_TZ_FLAG_CBC in "EPWM_clearTripZoneFlag(EPWM2_BASE, (EPWM_TZ_INTERRUPT | EPWM_TZ_FLAG_CBC));" to EPWM_TZ_FLAG_OST.
Note: Of course, I changed the voltage added onto the GPIO12 pin between 0V and 3.3V many times.
If something is wrong? or I misunderstanding something about it saying "To re-enable the OST Interrupt, uncomment the below code"?
------------------------------------------------------------------------------------------------------------------------------------
__interrupt void epwm1TZISR(void)
{
epwm1TZIntCount++;
//
// To re-enable the OST Interrupt, uncomment the below code:
//
EPWM_clearTripZoneFlag(EPWM2_BASE, (EPWM_TZ_INTERRUPT | EPWM_TZ_FLAG_CBC));
//
// Acknowledge this interrupt to receive more interrupts from group 2
//
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP2);
}
------------------------------------------------------------------------------------------------------------------------------------