• AVR Freaks

Hot!PIC32MK Clear CN Change Notification Interrupt

Author
Blue_Key
Junior Member
  • Total Posts : 115
  • Reward points : 0
  • Joined: 2011/12/20 04:48:22
  • Location: 0
  • Status: offline
2018/10/30 23:23:05 (permalink)
0

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 ?
}

#1

1 Reply Related Threads

    Jim Nickerson
    User 452
    • Total Posts : 5962
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: PIC32MK Clear CN Change Notification Interrupt 2018/10/31 06:25:42 (permalink)
    4 (1)
    Maybe you could read the port with the CN of interest.
    I see this section in the manual.

    I would only read and store the port to a global volatile variable and set a global volatile variable flag in the IRQ and process the port value in the main line program
    post edited by Jim Nickerson - 2018/10/31 06:29:16

    Attached Image(s)

    #2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5