1

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;
TrebledJ
  • 8,713
  • 7
  • 26
  • 48
Chao Duan
  • 11
  • 1

1 Answers1

0

The global Interrupt enable is missing:

INTCON2.GIE = 1;
Mike
  • 4,041
  • 6
  • 20
  • 37
  • I am not really familar eith the dsPIC but try to modify your Interrupt routine: `void _ISR _Int2Interrupt(void)` – Mike Jan 21 '19 at 06:51