Skip to main content

report_last_panic

Function report_last_panic 

Source
pub fn report_last_panic()
Expand description

Replay the persisted last-panic report into the log ring.

Prefers the RTC snapshot: it is written on every panic (it cannot fail) and only zeroed on power-on, so whenever its magic checks out it is at least as fresh as the NVS copy — which is skipped while flash is busy, e.g. a panic during a config save. NVS is the fallback after a power cycle. Called once at startup, before the USB task is spawned; the ring buffers the report until a host connects. Nothing is cleared — the next panic overwrites it.