sleep() [ Sleep ]

HIBERNATE (SystemSleepMode)


SystemSleepConfiguration config;
      .gpio(WKP, RISING);

The 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 P2/Photon 2
Time (RTC) 1

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
P2 114 uA 115 uA
Argon 65 uA n/a
Electron 114 uA 114 uA
Photon 114 uA 114 uA

In this mode 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, B-Series SoM, and E404X you can only wake by pin, not by time, in HIBERNATE mode.

  • On the Tracker SoM, Tracker One, and Monitor One, 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 3 devices (Argon, Boron, B-Series SoM, E404X, Tracker SoM, Tracker One), can wake on analog voltage comparison.

P2 and Photon 2 Devices:

  • The P2 and Photon 2 do not support holding a GPIO in OUTPUT mode when in HIBERNATE mode. The pin will go into high impedance mode.

  • The P2 and Photon 2 can only wake from HIBERNATE mode on WKP (D10), RISING, FALLING, or CHANGE.

  • On the Photon 2, pin D10 is in the same position as the Argon/Feather pin D8.

  • On the P2, pins S4, S5, and S6 do not support pull-up or pull-down in HIBERNATE sleep mode. Use an external pull resistor if this is required.

  • On the Photon 2, pin S4 is in the position of A4 on the Argon and other Feather devices. It does not support pull-up or pull-down in HIBERNATE sleep mode. Use an external pull resistor if this is required.

  • The P2, Photon 2, and Tracker M do not support wake on analog.

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.