I would like use external interrupt for a touch screen chip. I could successfully configure the TFT chip right now. But fail to trigger my interrupt. I think I have correct configuration about my MCU.
void STMPE610_check_tp() iv IVT_ADDR_INT2INTERRUPT{
Check_TP();
STMPE610_WriteReg(0x0B, 0xFF);//clear the interrupt status
IFS1.INT2IF = 0;
}
TRISA.b7=1;
Unlock_IOLOCK();
PPS_Mapping_NoLock(23,_INPUT, _INT2);
Lock_IOLOCK();
INTCON2.INT2EP =1;
IEC1.INT2IE = 1;
IFS1.INT2IF = 0;
IPC7 = IPC7 ^ 0x0050;