When using the deep sleep functionality on several ESP-01 boards, the boards require two resets in order to wake up properly (regardless of whether the resets are done by manually bridging the rst pin or by soldering a wire to do it from an interrupt). The boards do wake up and print some text automatically, but they do not run their firmware/code.
#include <ESP8266WiFi.h>
void setup() {
Serial.begin(74880);
Serial.print("\n--------------STARTING----------------\n");
//pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
//digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off (gpio @ high= off)
delay(500);
ESP.deepSleep(2000000, WAKE_RF_DEFAULT );
}
void loop() {
}
I have not been able to just wake the board and run the code like most examples on the web intend to work, so I suppose the problem is not with this code.
On a successful wake up, the serial output looks like this:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3456, room 16
tail 0
chksum 0x84
csum 0x84
va5432625
~ld
--------------STARTING---------------
After the first reset, the board does indeed wake up, but it does not run it's code. It only prints this
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
And then hangs there. After another reset, it successfully runs it's code.
This issue persists across all the esp 01 boards i own, and i have tried pulling UP and DOWN almost every combination of pins recommended. The line that is printed in the fauly cases does indeed say it is booting in the right mode, but still the code does not run, nor mine nor the one that runs before mine