Shutting Down iMXRT1602

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

Shutting Down iMXRT1602

854 Views
gredpath
Contributor III

We have a product, and we wish to shut it down using a short press of the On/OFF switch, and then wake it up again using On/Off switch.

We wish to gracefully save the OCRAM & SDRAM contents first and then shutdown.

We have the power_mode_switch_bm example working, and we can shut down using the H key, and wake up again using the On/Off button.

My question is how do I trigger the LPM_EnterSNVS() function using the On/Off switch?

I assume we use the interrupt SNVS_LP_WRAPPER_DriverIRQHandler, and modify it accordingly.

Many thanks

George Redpath

0 Kudos
Reply
2 Replies

766 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi George,

 

LPM_EnterSNVS() is an API to enter SNVS mode by software. On the other hand, when you enter SNVS mode by pressing the ON/OFF button you are entering by hardware. Therefore, you do not need to trigger the LPM_EnterSNVS() function using the ON/OFF button.

 

If you are using power_mode_switch_bm, you will only need to long pressing ON/OFF button. For more information I recommend you to check the following application note.

 

https://www.nxp.com/docs/en/application-note/AN12085.pdf

 

I hope this helps!

 

Best regards,

Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

766 Views
gredpath
Contributor III

I have made some progress, and have managed to get the interrupt to cause a shutdown, but we still have a problem, as this is not a regular GPIO, how do I clear the interrupt. I can disable the interrupt, and only re-enable after a delay, getting round the issue of pressing on the switch to waken up, then immediately causing a shutdown, but as soon as the delay clears the interrupt is still set, so it shuts down.

0 Kudos
Reply