Other Parts Discussed in Thread: CONTROLSUITE
Hello
I'm working on a F28377D.
I have an external component which generate an interrupt signal on falling edge.
Then I route this hardware signal to the GPIO69 -> Input X-Bar (Input4) -> XINT1 -> INT1.4.
So I used the interrupt exemple to implement my code provided Bellow.
On ISR routine, I make specific operation on External component (via SPI) to clear the interrupt on it then External Interrupt pin goes Up)
This work correctly, but sometime, external Interrupt goes low, but internal ISR routine not called.
When this occurs, I read some registers:
- GPCDAT.GPIO69 is 0 (I read also this state on oscilloscope!
- InputXbarRegs.INPUT4SELECT is well set to 69
- XintRegs.XINT1CR Polarity is 00, Enable is 1
- PieCtrlRegs.PIECTRL.ENPIE is set.
- PieCtrlRegs.PIEIER1.INT4 is set.
- BUT PieCtrlRegs.PIEIFR1.INT4 is clear.
and PIEACK is 0x0000
So I don't understand why sometime GPIO69 goes low but Int4 flag is not set.
What wan I read to see where interrupt propagation was stopped? (between GPIO69 falling edge and INT4 Flag not set..)?
Note: When I blocked in this state, I set INT4 Flag with debbuger, then routine is called, so SPI read is done on external Controller which make GPIO 69 set to 1. Then, next interrupt signal (GPIO69 falling edge) will work again, until few seconds (10 - 20s) where a Falling edge will not trig interrupt routine for unknown reason...
Thank
Annex: My code:
PieVectTable.XINT2_INT = &Sync0Isr;
PieCtrlRegs.PIEIER1.bit.INTx4 = 1; // Enable PIE Group 1 INT4 (for XINT1)
IER |= M_INT1; // Enable group 1 interrupts
EALLOW;
// GPIO69 is inputs for PDI IRQ
GpioCtrlRegs.GPCMUX1.bit.GPIO69 = 0; // GPIO
GpioCtrlRegs.GPCDIR.bit.GPIO69 = 0; // input
GpioCtrlRegs.GPCQSEL1.bit.GPIO69 = 0; // XINT1 Synch to SYSCLKOUT only
EDIS;
// GPIO69 is XINT1
GPIO_SetupXINT1Gpio(69);
// Configure XINT1 & XINT2
XintRegs.XINT1CR.bit.POLARITY = 0; // Falling edge interrupt
XintRegs.XINT2CR.bit.POLARITY = 0; // Falling edge interrupt
XintRegs.XINT1CR.bit.ENABLE = 1; // Enable XINT1
__interrupt void EscIsr( void )
PDI_Isr();
/* reset the interrupt flag */
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
}