So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By schufti
#83575 I deliberately didn't reccomend or advise to update to the newest version.
Unfortunaltely they broke a lot of things after 2.4.2 ...
Try with some 2.3 version, IIRC that's when sth like

Code: Select allstruct rst_info {
  uint32 reason;
  uint32 exccause;
  uint32 epc1;
  uint32 epc2;
  uint32 epc3;
  uint32 excvaddr;
  uint32 depc;
};

void setup() {
  rst_info *xyz;

  xyz = ESP.getResetInfoPtr();
  Serial.begin(74880);
  Serial.println("Reason_fn " + String(ESP.getResetReason()));
  Serial.println("Reason_ptr " + String((*xyz).reason));
}

void loop() {
  Serial.println("in loop(), you may now reset, power off/on or wait 5s for 5s deepsleep");
  delay(5000);
  Serial.println("going into deepsleep");
  ESP.deepSleep(5000000);
  delay(10); 
}

still worked reliably.