This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can pin status retained after system reset with deep sleep wakeup?

Hi all,

I have one question about the deep sleep wakeup process in NRF24LE1. I want to realize the function that "when I press the button, it will cause rise edge on the pin, and wake the deep sleep mode up. Then after the reset, I can still determine which buttons I pressed."

For example, say one remote control device that control the LED on or off, in most of time, it's in deep sleep mode. Then I pressed one button, it can light the LED on or off just pressed one time. So, in the code, I have to check which button was pressed after system reset.

Can I realize this function with deep sleep mode or memory retention mode? I'm wondering that the system wakeup reset will discard the wakeup sources information.

Hope someone would do me a favor, thanks in advance!

Best regards.

  • The way to do this would be to add a read sequence in main that will check the status of the wake-up pins as soon as possible. If the button push is only a few us long, you need to add some de-bouncing or circuitry to make sure that you are able to wake up the MCU on the LE1 to actually read the button status. We use this approach on our keyboard reference design without the need of any additional circuitry, but it depends on the use case. As long as it's a normal human button push, it should be plenty of time to read the button status upon reset.

Related