
The stored data can be retained between deep sleep cycles, but might be lost after power cycling the chip. offset is measured in blocks of 4 bytes and can range from 0 to 127 blocks (total size of RTC memory is 512 bytes). If you implement deep sleep with WAKE_RF_DISABLED and require WiFi functionality on wake up, you will need to implement an additional WAKE_RF_DEFAULT before WiFi functionality is available.ĮSP.deepSleepInstant(microseconds, mode) works similarly to ESP.deepSleep but sleeps instantly without waiting for WiFi to shutdown.ĮSP.rtcUserMemoryWrite(offset, &data, sizeof(data)) and ESP.rtcUserMemoryRead(offset, &data, sizeof(data)) allow data to be stored in and retrieved from the RTC user memory of the chip respectively.

(GPIO16 needs to be tied to RST to wake from deepSleep.) The chip can sleep for at most ESP.deepSleepMax() microseconds. mode is one of WAKE_RF_DEFAULT, WAKE_RFCAL, WAKE_NO_RFCAL, WAKE_RF_DISABLED. Some ESP-specific APIs related to deep sleep, RTC and flash memories are available in the ESP object.ĮSP.deepSleep(microseconds, mode) will put the chip into deep sleep.
