// EXAMPLE SystemSleepConfiguration config; config.mode(SystemSleepMode::ULTRA_LOW_POWER) .gpio(D2, FALLING); System.sleep(config);
SystemSleepMode::ULTRA_LOW_POWER mode is similar to STOP mode however internal peripherals such as GPIO, UART, ADC, and DAC are turned off. Like STOP mode, the RTC continues to run but since many more peripherals are disabled, the current used is closer to HIBERNATE. It is available in Device OS 2.0.0 and later.
In this mode:
- Real-time clock (RTC) is kept running.
- Network is kept on if used as a wake-up source (Gen 3 devices only).
- BLE is kept on if used as a wake-up source (Gen 3 devices only).
- GPIO, UART, ADC are only kept on if used as a wake-up source.
- GPIO are kept on; OUTPUT pins retain their HIGH or LOW voltage level during sleep.
- Can wake from: Time or GPIO. On Gen 3 also analog, serial, BLE, and network.
- On wake, execution continues after the the
System.sleep()command with all local and global variables intact.
|Wake Mode||Gen 2||Gen 3|
Typical power consumption in ultra-low power (ULP) sleep mode, based on the wakeup source:
|T523 Eval||139 uA||139 uA||140 uA||564 uA||214 uA||21.7 mA|
|T402 Eval||114 uA||114 uA||117 uA||530 uA||186 uA||16.9 mA|
|Boron 2G/3G||171 uA||174 uA||178 uA||610 uA||494 uA||16.4 mA|
|Boron LTE||127 uA||128 uA||130 uA||584 uA||442 uA||14.2 mA|
|B402 SoM||48 uA||47 uA||48 uA||557 uA||130 uA||9.5 mA|
|B523 SoM||54 uA||55 uA||56 uA||537 uA||139 uA||22.8 mA|
|Argon||82 uA||81 uA||82 uA||520 uA||141 uA||21.3 mA|
|Electron||2.42 mA||2.55 mA||n/a||n/a||n/a||n/a|
|Photon||2.76 mA||2.83 mA||n/a||n/a||n/a||n/a|
Cellular Devices (B Series SoM, Tracker SoM, Tracker One, Boron, E404X, E Series, and Electron):
On Gen 3 cellular devices, wake-on network can be enabled in ultra-low power mode. This is recommended for any sleep duration of less than 10 minutes as it keeps the modem active while in sleep mode.
You should avoid powering off and on the cellular modem in periods of less than 10 minutes. 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.