iMXRT1176 ONOFF short interruption

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMXRT1176 ONOFF short interruption

Jump to solution
2,018 Views
achampoux
Contributor I

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.

Labels (1)
0 Kudos
Reply
1 Solution
1,998 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @achampoux,

The code on the following post shows how to properly enable the interruption and how to use the handler.

Solved: Re: SNVS_PULSE_EVENT_IRQHandler constantly fires... - NXP Community

Please follow that code and let me know if you are still experiencing the issue at hand.

BR,
Edwin 

View solution in original post

0 Kudos
Reply
2 Replies
1,999 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @achampoux,

The code on the following post shows how to properly enable the interruption and how to use the handler.

Solved: Re: SNVS_PULSE_EVENT_IRQHandler constantly fires... - NXP Community

Please follow that code and let me know if you are still experiencing the issue at hand.

BR,
Edwin 

0 Kudos
Reply
1,983 Views
achampoux
Contributor I

Following this method for initialization worked, I would like to add some patches that where required:

Had to apply this patch in the IRQ for proper clearing of status flags: https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/SNVS-PULSE-EVENT-IRQHandler-constantly-fires/m-p...

And move those outside the condition in the IRQ handler.

0 Kudos
Reply