Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By jayeye
#41839 Please help me understand deep sleep behavior better.

When, as recommended, I connect GPIO16 to the RST pin (in case in matters: on an Adafruit HUZZAH (ESP-12) board; using the Arduino environment), the processor does indeed wake up, but its behavior is identical to a reset (I get the following on the debug UART:
Code: Select all ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld


Which is exactly what I get when I simply reset the board.

Q1: Is this the expected behavior? If so, what is the point of specifying the RF behavior after wakeup, since the processor resets anyway?

Q2: What really happens if I don't connect GPIO16 to RST? What I get from the debug UART is just:
Code: Select allets_main.c

Not even a CRLF. What does this really mean?

Thanks in advance

/ji

PS: I posted this on bbs.espressif.com, then discovered this board; if there is a reply there I will post it here, too!
User avatar
By leenowell
#41845 I believe the design is that when the time has expired, it pulses pin16 to reset the device and then assuming the device is now going to restart does nothing. So... Any code after your deep sleep command will not be executed.

If you do not connect pin 16 to reset, the device "hangs". I have not checked power usage to see whether it is in a deep sleep hang or not but essentially the only way out is to reset it manually.

Hope this helps

Lee.
User avatar
By wififofum
#41846
jayeye wrote:Q1: Is this the expected behavior? If so, what is the point of specifying the RF behavior after wakeup, since the processor resets anyway?


Yes. Because the RTC memory is not cleared on wakeup so you (and the default functions) can determine if you are waking up by calling system_get_rst_info