Sleep modes and waking up

A battery device spends most of its time asleep. What stays on, what wakes it up, and what is lost while it sleeps.

Core

Deeper sleep saves power but wakes more slowly Three sleep depths: each deeper one switches off more clocks, regulators and memory, so it draws less power but takes longer to wake, and the deepest loses RAM contents. An RTC alarm, a pin change from a sensor's interrupt line, or a peripheral event wakes the microcontroller. power drawn wake-up time Not to scale Light sleep some clocks off Deeper sleep more clocks and regulators off Deepest sleep memory off too: RAM contents lost What triggers a wake-up RTC alarm Digital sensor watches its own threshold Peripheral event interrupt line: a pin change so the chip can stay asleep until something actually changes (a button can raise a pin change too) such as an incoming byte Microcontroller asleep
Each deeper sleep mode draws less power but takes longer to wake, and the deepest loses RAM; an RTC alarm, a pin change or a peripheral event wakes the chip.

Key points

  1. Microcontrollers offer several sleep depths; deeper modes switch off more clocks, regulators and memory, saving power at the cost of longer wake-up times and, in the deepest modes, lost RAM contents.12
  2. Common wake sources are an RTC alarm, a pin change from a button or sensor interrupt, and a peripheral event such as an incoming byte.12
  3. Many digital sensors can watch a threshold themselves and raise an interrupt line, letting the main processor stay asleep until something actually changes.3

Where to go next

Sources

  1. ESP-IDF: Sleep Modes · Espressif · Project docs
  2. RP2350 datasheet · Raspberry Pi · Datasheet
  3. LIS2DW12 datasheet (ST DocID029682 Rev 4) · STMicroelectronics · Datasheet