All jobs / Embedded / hardware / Low-Power Design
Embedded / hardware interview question · 3–5 years
A sensor should sleep between readings, but the average current says it is barely sleeping at all.
How do you find what is waking it?
The strongest answer
Read the wake-cause register the moment it comes back, and toggle a spare GPIO on sleep entry and exit so a scope shows every wake lined up against the current trace
Why it works
Exactly — measure before you guess. An interrupt flag left pending before sleeping wakes you instantly, and only the cause register shows that.
What a good answer covers
- Instrument the wake before changing anything.
- Read the wake-cause register.
- Toggle a GPIO on entry and exit.
- Clear pending flags before sleeping.
Answers that fall short
- Close, but not the strongest: I would disable the wake sources one by one and watch the current until it drops
That gets there eventually; instrument first, so you know whether it wakes early or never sleeps at all. - Weak: The datasheet’s sleep current is optimistic; I would budget for the number I measure and move on
Accepting the number gives up the real cause — usually a floating input, a live debug interface or an uncleared flag. - Red flag: I would hold the part asleep longer by ignoring interrupts for a fixed window after each wake
Ignoring interrupts for a window drops real events and turns a power bug into a data-loss bug.
Who gets asked this
More Low-Power Design questions
- A product team wants a coin-cell sensor to run for years, and the first prototype is nowhere close. Which…
- Who owns battery life in a device company?
- Your MCU offers several sleep modes. What actually differs between them?
- Battery dies in hours, not months. What do you measure first?
- How do you talk power without a fake “months of battery” slide?