Hi,
I'm working with an Embedded Artists uCOM IMXRT1176 board, trying to receive the short duration ONOFF button interruption for graceful shutdown. I can properly power on and get the emergency power off to shut down.
Here is a snippet of my current code:
void SNVS_PULSE_EVENT_IRQHandler(void);
void SNVS_PULSE_EVENT_IRQHandler(void)
{
// indicate interruption happened
}
void init(void)
{
// Enable the interruption
SNVS->HPCR |= (1U << SNVS_HPCR_BTN_MASK_SHIFT);
// Clear interruptions
SNVS->LPSR |= (1U << SNVS_LPSR_SPOF_SHIFT);
SNVS->LPSR |= (1U << SNVS_LPSR_EO_SHIFT);
}
I verified that the interrupt flags are properly cleared, and the interruption enabled but I still can't get in SNVS_PULSE_EVENT_IRQHandler(). I figured it from the startup_mimxrt1176_cm4.c file:
SNVS_PULSE_EVENT_IRQHandler, // 84 : ON-OFF button press shorter than 5 secs (pulse event)
Am I using the right interrupt handler? Am I doing something wrong? Couldn't find an example on this. Using 2.14 version of SDK.