esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
15.96k stars 13.34k forks source link

ESP8266 doesnt wake up after put to deepsleep. #4071

Open grek22 opened 6 years ago

grek22 commented 6 years ago

Hardware: wemos d1 r1 SDK: v2.1.0-10-g509eae8

.ino:

include

include

include

const char ssid = ""; const char password = ""; WiFiClient *client = new WiFiClient(); IPAddress clientIP = IPAddress(9xxx);

OneWire oneWire(5); DallasTemperature sensors(&oneWire); float temp1; unsigned czas; void work();

void setup(void) { Serial.begin(115200); while (!Serial) delay(10); czas = millis(); WiFi.config(IPAddress(192, 168, 8, 110), IPAddress(192, 168, 8, 1),IPAddress(255,255,255,0)); WiFi.begin(ssid, password); sensors.setResolution(9); sensors.begin(); while (WiFi.status() != WL_CONNECTED) { if((millis()-czas)>10000) ESP.deepSleep(60e6, WAKE_RF_DEFAULT); delay(100); } work(); }

void loop(void) { delay(10); }

void work() { do { sensors.requestTemperatures(); temperatura1 = sensors.getTempCByIndex(0); } while (temperatura1 == 85 || temperatura1 == -127); sensors.requestTemperatures(); delay(500); temp1 = sensors.getTempCByIndex(0); String url = "example"; client->connect(clientIP, 80); client->println(url) client->flush(); client->stop(); delete client; ESP.deepSleep(10e6, WAKE_RF_DEFAULT); }

Problem: After a random time ESP doesnt wake up. [zombie mode on GPIO-0]

Conection: RST-> GPIO16

5chufti commented 6 years ago

you're sure it is zombie mode and not wdt because it got stuck in "while (temperatura1 == 85 || temperatura1 == -127);" because of flakey sensor?

devyte commented 4 years ago

Does this: https://github.com/esp8266/Arduino/issues/6007#issuecomment-606414184 help at all? (47K pullup on MISO)

sjirka commented 4 years ago

47K pullup on MISO solved this issue for me on ESP12F

kebwi commented 4 years ago

I've been dealing with the zombie deep sleep wake up on my D1 mini clones. I went through that other thread in detail. I don't have any 47k resistors, but I put a 10K on MISO (pin D6 on the D1 -- this terminology is horrendous), but I still get the same failed wake up.

devyte commented 3 years ago

Does this work to wake up the ESP: https://github.com/esp8266/Arduino/issues/6007#issuecomment-542192213 ?