iMXRT1176 ONOFF short interruption

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMXRT1176 ONOFF short interruption

ソリューションへジャンプ
1,134件の閲覧回数
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.

ラベル(1)
0 件の賞賛
返信
1 解決策
1,114件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
1,115件の閲覧回数
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 件の賞賛
返信
1,099件の閲覧回数
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 件の賞賛
返信