This is now an SDK issue!
It is actually basic digital design stuff. Let me try to explain...
ESP8266 wakes from deep sleep by resetting itself, where it is the same recent as a user reset using a button. But when deep sleep is enabled, the chip RESETS ITSELF.
So in the hardware, once deep sleep is enabled - the chip expects the next reset event to be a wake-up reset. And if the user pulls the line low at this stage when deep sleep is enabled - the chip will think the GPIO caused this, not the user!
What you can do is you can use an external latch (a simple MOS and capacitor based one, will cost less than a button itself!) which stays high for say 5 seconds after the USER presses the reset button. The ESP8266 can then read this and determine if a button was pressed recently!
This is additional circuit design that is necessary to detect a button press. The ESP8266 has no internal hardware to distinguish (if deep sleep is enabled) whether a physical button press caused reset or a system wakeup caused a reset because they both do the same thing - alter reset pin!
After posting my question, a friend suggested precisely the external latch solution you offered as an alternative for this application. It will also have a much lower power consumption since the ESP is powered of until the button is pushed. As soon as my MOSFET order arrives, I will test the solution.
Who is online
Users browsing this forum: No registered users and 1 guest
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
We also have a RTOS version and a MESH version too!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!