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.

TMS320F28379D: External interrupt isn't working during interrupt.

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

dear Team, 

I want to set external interrupt during epwm interrupt for protection. 

during ePWM interrupt, I set PIEIFR to be active XINT. 

but it didn't work.

please help it work and where should I check? 

the code is as follow,

initial set 

GPIO_setInterruptType(GPIO_INT_XINT1, GPIO_INT_TYPE_RISING_EDGE);
GPIO_setInterruptPin(11, GPIO_INT_XINT1);
GPIO_enableInterrupt(GPIO_INT_XINT1);
Interrupt_enableInCPU(INTERRUPT_CPU_INT1);

Interrupt_enable(INT_XINT1);

ePWM ISR: 

// // If Fault, raise Fault interrupt by Software
if(flag_fault)
{
PieCtrlRegs.PIEIFR1.bit.INTx4 = 0x01;
}

best regard. 

  • Hello,

    Please refer to the C2000ware examples to check your configuration and if you cleared you interrupt flag correctly: C:\ti\c2000\C2000Ware_5_04_00_00\driverlib\f2837xd\examples\cpu1\interrupt\interrupt_ex1_external.cand bit-field: C:\ti\c2000\C2000Ware_5_04_00_00\device_support\f2837xd\examples\cpu1\external_interrupt\cpu01\ExternalInterrupt.c

    On the first look, it seems you did not clear the interrupt flag. Code would be: PieCtrlRegs.PIEACK.all = 1