Home / Learn Chip Programming / STM32 Low Power: Sleep, Stop, Standby

STM32 Low Power: Sleep, Stop, Standby

Use the three STM32 low power modes and wake sources.

In shortUse the three STM32 low power modes and wake sources.

Theory in plain words

Mode ladder (typical F4/L4)Run: 30 to 100 mASleep: CPU off, peripherals on, wake in ~1 usStop: clocks off, RAM kept, ~2 to 20 uA, wake in ~5 usStandby: only backup domain, ~0.3 to 2 uA, resets on wake
Mode ladder (typical F4/L4)

What it is

Sleep stops the CPU clock only. Stop stops all clocks but keeps RAM and registers. Standby powers down almost everything; only backup domain survives.

Why we use it

The same chip can draw 30 mA running or 2 uA in Stop, so mode choice sets battery life.

How it works

Configure wake sources (EXTI, RTC alarm, LPUART), enter with WFI, re-init the clock after Stop because it falls back to HSI.

Where it is used

  • Sensor nodes
  • Wearables
  • Remote loggers

Mode picker

Estimate current by duty cycleTry it Yourself

Stop mode with a short active burst gives months or years. Standby saves the most but loses RAM and re-runs from reset.

Enter Stop mode and wake by RTC alarm
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
SystemClock_Config();            // after wake-up the clock is back to HSI: set up PLL again
// Before sleeping: set unused GPIOs to analog, disable debug in sleep (DBGMCU), stop unused peripherals
Tip:The ST-LINK debugger itself keeps the MCU awake. Measure power with the debugger disconnected, using a multimeter in series or a Power Profiler Kit.

Quick quiz

1. Which mode keeps RAM and registers but stops clocks?

2. After Stop mode you must...