Page 1 of 1

Deep Sleep Wakeup and Interrupt

Posted: Mon May 21, 2018 6:35 pm
by jvanderstelt
I wanted to use deep sleep and respond to a user pressing a button and use a timer for a heartbeat. My question is:

With deep sleep I can set up the esp32 to wake up from deep sleep with the button press. When the CPU is running I can set up an interrupt to handle the button press.


If the deep sleep wakes up because of a timer, and the user presses the button before the code registers the interrupt handler, what happens?

Re: Deep Sleep Wakeup and Interrupt

Posted: Tue Feb 05, 2019 10:15 am
by Hr.Mitrev
Hi!
I don't have an answer, but I have similar question - can I configure GPIO as both wake up stub and interrupt while the CPU is running, or I should configure the interrupt first and then change it to wake up stub before going to sleep? Also what happens if you have configured wake up source and it kicks in while the cpu is running? Also it seems that as jvanderstelt mentioned it takes quite a bit of time to setup peripherals after deep-sleep how we can counteract that?