PIC32MK Clear CN Change Notification Interrupt
I'm trying to clear the CN interrupt on a PIC32MK.
I went through the datasheet, but I cannot find any clear information how to do it.
It seems Harmony also is not able to clear this interrupt.
void __ISR(_CHANGE_NOTICE_G_VECTOR, ipl1AUTO) _IntHandlerChangeNotification_PortG(void)
{
PLIB_INT_SourceFlagClear(INT_ID_0,INT_SOURCE_CHANGE_NOTICE_G); // don't know what it does but doesn't seem to work
volatile int a = PORTG; // tried to read the port as some thread suggested
IFS1bits.CNGIF = 0; // Clear CN interrupt, supposidely clears the interrupt ?
}