Back to Journal
Embedded SystemsMay 2, 20264 min

Persisting boot count and reset reasons for field debugging

You can't attach a debugger to a gateway in a barn. So the firmware keeps its own black box.

By Embedded Engineer

No debugger in the field

A gateway deployed on a farm or a factory floor has no serial console attached. When something resets it at 3 a.m., you need the device to tell you why after the fact.

A tiny persisted black box

The firmware persists a boot count and a rolling reset-reason history to non-volatile storage. On boot it records why the last run ended — brown-out, watchdog, panic, or a clean restart — and keeps the last several entries.

That single feature has turned "it randomly rebooted" into "brown-out at boot 412, correlated with the pump relay switching" more than once. Cheap to build, invaluable in the field.

Join the Engineering Beta

Get technical updates, circuit diagrams, and early access to firmware source code as we build in public.

Strict Privacy Policy · No cloud analytics · No spam