• AVR Freaks

Hot!Interrupts (change notification) programming with Harmony v3

New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2019/07/24 05:14:58
  • Location: 0
  • Status: offline
2020/03/31 13:55:16 (permalink)

Interrupts (change notification) programming with Harmony v3

I am trying to generate interrupts on PIC32MZ2048EFM144 pin 23 on Curiosity 2.0 with plugin Harmony v3 (MPLB X IDE v3.5) and I can't succeed.
I have defines some IOs:
LED1 pin 134 as GPIO output
SW1  pin 131 as GPIO input (with change notification and pullup)
INTx  pin 23  as GPIO input (with change notification and pullup)
In addition to the generated code in main I have added the following:
As handlers:
static void SW1_User_Handler(GPIO_PIN pin, uintptr_t context) { LED1_Toggle(); }
static void INTx_User_Handler(GPIO_PIN pin, uintptr_t context) { LED1_Toggle(); }
As callbacks and enablers:
    GPIO_PinInterruptCallbackRegister(SW1_PIN, SW1_User_Handler, 0);
    GPIO_PinInterruptCallbackRegister(INTx_PIN, INTx_User_Handler, 0);

Pressing SW1 reacts normally. LED1 toggles as expected. But connecting pin 23 (INTx) to ground gives no reaction.
Any advice or help?

0 Replies Related Threads

    Jump to:
    © 2020 APG vNext Commercial Version 4.5