Hi Daniel,
We must have been thinking the same thing! 1st thing to know is that the CRTOUCH interrupt pin can only be cleared by reading the status registers in the CRTOUCH and I also by reading the data register (I think). BOTH of these require a read operation... which won't run within the ISR.
I tried disabling the pin interrupts for PORTC so at least the MCU would not respond to the CRTOUCH after getting the initial IRQ:
ISR CODE:
PORT_HAL_ClearPortIntFlag(PORTC_BASE_PTR);
PORT_HAL_SetPinIntMode(PORTC_BASE_PTR,PADEVT,kPortIntDisabled);
_lwevent_set(&portcevents,0x01);
It's surprising to see this problem, when it is common to have to read a register on the slave device in order to clear the interrupt.
Also, it's surprising that no example exists for a Freescale M4 processor and CRTOUCH combination. It doesn't appear that the CRTOUCH is that popular or isn't used in this configuration very often?
I chose the Freescale K64F, KDS, MQX platform because it appeared that Freescale was very engaged with creating solutions for easy 'on-ramp' of their products. Instead, I'm spending days and hours working on basic interface issues instead of my application.
Sorry to dump on you Daniel, I guess I just need another cup of whiskey... I mean coffee.
Please let me know if find a solution.
Thanks