Skip to content

DBG-13 No early power-fail signal on a board that writes storage (SD, eMMC, flash)

Severity Status Implementation
suggestion planned mid, depends on NET-5, NET-7

Looks at. Storage parts (part class), input rail and regulator (NET-5 sources), a comparator ahead of it.

What it catches. A board with an SD card, eMMC or a flash the firmware writes to, and no comparator or supervisor on the input ahead of the regulator that warns the MCU before its own rail drops.

Why it matters. A write cut by power loss corrupts a file system or a flash page; an SD card's internal controller can lose more than the block being written. The MCU's own brown-out reset comes too late: it fires when the rail is already sagging. Watching the input, upstream of the regulator and its bulk capacitance, gives milliseconds of warning: enough to finish a block and stop.

Example. B125B logs to a microSD card from PoE or bus power; the rev B notes ask for a voltage comparator on both inputs "to know earlier that power is gone and stop writing to SD".

How to check. If storage parts exist, look for a comparator or supervisor whose sense input divides down the input rail (before the regulator) and whose output reaches an MCU pin with an interrupt. An MCU-internal detector (STM32 PVD) watching VDD counts only partially: it sees the rail after the regulator.

Fix. A comparator or supervisor on the input with its output on an interrupt pin, enough bulk capacitance behind the regulator to hold up the time a write needs, and a power-loss-tolerant file system in the firmware.

References. AN5096 §1.2.2 (PVD, an internal detector on VDD); littlefs, DESIGN.md (power-loss resilience) (github.com/littlefs-project/littlefs/blob/master/DESIGN.md); B125 rev B change list.