← Back to the chapter · Previous detail · Next detail →

Technical detail · Maintainable Firmware Practices

Retain evidence across a restart

Use low-cost signals first: reset reason registers, monotonically increasing boot counters, queue high-water marks, publish retry counters, last-fault enums, firmware semantic version, git SHA or build ID, configuration schema version, OTA image slot, rollback reason, and compact timing measurements. On an ESP32, that may include NVS keys, partition table, FreeRTOS stack high-water marks, and esp_reset_reason output. On Nordic or STM32 targets, it may include retained RAM flags, watchdog cause, flash-log sequence numbers, and power-profile notes from a shunt or power profiler.

← Back to the chapter · Previous detail · Next detail →