// EXAMPLE SystemSleepConfiguration config; config.mode(SystemSleepMode::HIBERNATE) .gpio(WKP, RISING); System.sleep(config);
SystemSleepMode::HIBERNATE mode is the similar to the classic
SLEEP_MODE_DEEP. It is the lowest power mode, however there are limited ways you can wake:
|Wake Mode||Gen 2||Gen 3|
|GPIO||WKP RISING Only||✓|
1Tracker SoM can wake from RTC in HIBERNATE mode. Other Gen 3 devices cannot.
Typical power consumption in hibernate sleep mode, based on the wakeup source:
|T523 Eval||103 uA||95 uA|
|T402 Eval||103 uA||95 uA|
|Boron 2G/3G||146 uA||n/a|
|Boron LTE||106 uA||n/a|
|B402 SoM||26 uA||n/a|
|B523 SoM||30 uA||n/a|
|Electron||114 uA||114 uA|
|Photon||114 uA||114 uA|
In this mode:
- Real-time clock (RTC) stops (Argon, Boron, B Series SoM).
- Can wake from: Time or GPIO. On Gen 3 also analog.
- On wake, device is reset, running setup() again.
Gen 3 Devices (B Series SoM, Tracker SoM, Tracker One, Boron, Argon, and E404X):
On the Argon, Boron, and B Series SoM you can only wake by pin, not by time, in HIBERNATE mode.
On the Tracker SoM you can wake by time from HIBERNATE mode using the hardware RTC (AM1805).
You can wake from HIBERNATE (SLEEP_MODE_DEEP) on any GPIO pin, on RISING, FALLING, or CHANGE, not just WKP/D8 with Device OS 2.0.0 and later on Gen 3 devices.
Since the difference in current consumption is so small between HIBERNATE and ULTRA_LOW_POWER, using ULTRA_LOW_POWER is a good alternative if you wish to wake based on time on Gen 3 devices. The difference is 106 uA vs. 127 uA on the Boron LTE, for example.
GPIO are kept on; OUTPUT pins retain their HIGH or LOW voltage level during sleep.
Gen 2 Devices (E Series, Electron, Photon, and P2; does not include E404X):
On the Photon, P1, Electron, and E Series you can only wake on time or WKP RISING in HIBERNATE mode.
GPIO are put into high impedance state before sleep. However, you can use
pinMode(INPUT)to disconnect output pins on Gen 2 devices so the same code can be used for both Gen 2 and Gen 3 with HIBERNATE mode.
Cellular Devices (B Series SoM, Tracker SoM, Tracker One, Boron, E404X, E Series, and Electron):
- On cellular devices, the cellular modem is turned off in HIBERNATE mode. This reduces current consumption but increases the time to reconnect. Also, you should avoid any HIBERNATE period of less than 10 minutes on cellular devices. Since the cellular modem needs to reconnect to the cellular network on wake, your mobile carrier may ban your SIM card from the network for aggressive reconnection if you reconnect more than approximately 6 times per hour.