Skip to content
Tech Interview Prep
Technical interview guide

Power Management & Low-Power Design

The sleep modes, clock strategies, and wake mechanisms that let a battery-powered device run for months or years on a small cell.

Minutes to read
3
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed

Scope: Current Zephyr system/device/runtime PM; CMSIS-Core 6 WFI/WFE; CMSIS-RTOS and FreeRTOS tickless guidance reviewed 2026-09-04.

Overview

Curated: · Written: · Reviewed:

Power Management & Low-Power Design

In one line

Battery life is set by how long the device spends in each sleep state, what each transition costs, and which wake source survives the state you choose. Reach for it whenever a design has long idle gaps and a fixed battery budget.

Key definitions

  • State retention: what a sleep state keeps powered (SRAM, registers, backup domain). It decides whether you resume in place or re-initialize.
  • Transition cost: the charge and time to enter and exit a state. It is why the deepest state loses on short gaps.
  • Break-even time: the idle length at which a state starts to save energy.
  • Wake source: a peripheral or event that stays powered and clocked in the chosen state.
  • Lost wakeup: an event that arrives between the work check and WFI and is never serviced.
  • Usage count: outstanding clients that need a runtime-PM device active. Every get is paired with a put, on error paths too.

Formulas and complexity

E=∑(Pstate×tstate)+∑EtransitionE = \sum (P_{state} \times t_{state}) + \sum E_{transition} tbe=QtransitionIrun−Istopt_{be} = \frac{Q_{transition}}{I_{run} - I_{stop}} Iavg=Iactivetactive+Isleeptsleep+QtransitionNTI_{avg} = \frac{I_{active} t_{active} + I_{sleep} t_{sleep} + Q_{transition} N}{T}

Q_transition is the charge spent per transition in coulombs, and the energy term is E_transition = V × Q_transition at the supply voltage. Battery life is usable capacity divided by I_avg, after derating for temperature, cutoff voltage and converter efficiency.

How it works

Energy is state power times residence time, plus the cost of every transition. Before choosing a state, predict the idle gap and compare it with the state's break-even time. Entry is a race: mask the producer interrupt, re-read the work flag, then execute WFI with a wake source that is enabled and powered in the target state. A pending enabled interrupt wakes WFI even when PRIMASK masks its handler, so the handler runs after wake only if it is unmasked. On wake, restore clocks, then peripherals, then DMA, before any consumer runs.

No Yes Predict idle gap Gap longer than break-even? Stay in Sleep or Run Mask producer IRQ and re-check work flag Arm wake source powered in target state Enter state with WFI or WFE Wake, restore clocks, peripherals, DMA

When to use and when not to

ConditionFavours a deeper stateFavours a shallower state
Expected idleWell past break-evenShorter than break-even
Next deadlineWake latency fits the deadlineWake latency exceeds the deadline
State dataCan be re-initialized after wakeMust resume in place
Wake sourcePowered and clocked in the stateNeeds a clock the state gates
Peripheral activityQuiesced, DMA complete, cache maintainedTransfer or radio event pending

Traps interviewers probe

  • "The deepest state is cheapest." Compute break-even first. With an 18 µC transition, 8.4 mA run current and 2.1 µA stop current, break-even is 18 µC / (8.4 mA − 2.1 µA) ≈ 2.14 ms, so a 200 µs gap stays in Sleep.
  • "WFI saves power, so just WFI." WFI only suspends instruction execution. Mask the producer, re-read the flag, then sleep. Marking the flag volatile does not close the race.
  • "2.1 µA means capacity divided by 2.1 µA." The figure is measured at 25 °C with peripherals off. Measure or derate at the deployment temperature and voltage.
  • "The watchdog sleeps too." Independent watchdogs often keep running in Stop. A 4 s IWDG with a 30 s advertising interval resets the part unless it is fed from an RTC wakeup or reprogrammed.
  • "The multimeter confirms the budget." A DMM averages away wake transients and inrush. Use an auto-ranging power profiler sampling at 100 kHz or more, triggered by a firmware GPIO marker.

Interview tips

Open with the model: "Energy is state power times time plus transition cost, so I compute break-even per state against the idle distribution before choosing."

Expect this chain of follow-ups: break-even, then wake latency against the deadline, then retained state, then the wake-source matrix, then the measurement setup, then temperature and voltage corners. Have an answer for each link.

30-second outline:

  1. State the energy model and what the idle gaps look like.
  2. Give break-even for the candidate states and say which gap lengths fall on each side.
  3. Name the wake source that stays powered in the chosen state, and check its latency against the next deadline.
  4. Say what state data is lost, and how resume restores it.
  5. Say how you would measure it, and at which temperature and voltage.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.