Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Erik84750
#80581 I would like to use an external active low pulse on GPIO2 to wake ESP8266 from deep-sleep-forever.

https://techtutorialsx.com/2016/12/11/e ... nterrupts/ shows how to set a GPIO as interrupt handler.
However: when a ESP8266 is brought to deep sleep forever, will this GPIO, when set with an attachInterrupt, be able to bring the ESP8266 out of deep sleep?
User avatar
By btidey
#80585 No. That won't work.

In deep sleep the ESP8266 is doing nothing except potentially running a deep sleep counter which can send a pulse out on GPIO16 when it terminates. The CPU is off and it is not monitoring any GPIO.

The only ways out of deep sleep are to pulse the reset line, or the EN line, or to power cycle it.

The GPIO16 end of deep sleep pulse may be used to wake it back up by connecting to reset, or external circuitry can be used to do something with reset or EN. I actually prefer using EN as it is a raw input; the reset line normally has a timing capacitor which can complicate things.
User avatar
By Erik84750
#80587
btidey wrote:No. That won't work.

In deep sleep the ESP8266 is doing nothing except potentially running a deep sleep counter which can send a pulse out on GPIO16 when it terminates. The CPU is off and it is not monitoring any GPIO.

The only ways out of deep sleep are to pulse the reset line, or the EN line, or to power cycle it.

The GPIO16 end of deep sleep pulse may be used to wake it back up by connecting to reset, or external circuitry can be used to do something with reset or EN. I actually prefer using EN as it is a raw input; the reset line normally has a timing capacitor which can complicate things.


Ok, thanks for that.

Now what about the Light Sleep Forever mode? According to the attached notice the GPIO pins would remain active?
How to attribute a GPIO pin as an interrupt handler? How to program the ESP8266 so that this pin rewakes the chip on a high to low transition?
You do not have the required permissions to view the files attached to this post.
User avatar
By btidey
#80592 Yes. The GPIO can, in principle, wake the processor from light sleep. The pdf has an example on how to set that up and how to assign the wake up pin.

Note that some users have struggled to get this to work. See for example https://github.com/esp8266/Arduino/issues/1381

I don't use light sleep myself as the current drawn (1mA) is still too much for my battery applications. Deep sleep is much lower.