Understand STM32 low power hardware states
mainThe library manages different hardware power states with varying trade-offs between power consumption and wake-up latency:
- Idle mode: Lowest latency (µs range). Minimal power saving (mostly core). Memories and voltage supplies are retained.
- Sleep mode: Low latency (µs range). Higher power saving than idle. Memories and voltage supplies are retained.
- Deep sleep mode: Medium latency (ms range). Clocks are gated to reduce power. Memories and voltage supplies are retained. Supports peripheral wake-up (UART, I2C, etc.) if supported by the board.
- Shutdown mode: High latency (ms to seconds). Voltage supplies are cut except for the always-on domain. Memory content is lost and the system reboots upon wake-up.