Reset cause
Status flags that tell you why the microcontroller restarted — the only witness when a device in the field suddenly starts over from scratch.
Most microcontrollers have a register with one bit per source: power-on reset, brown-out, external reset pin, software reset and watchdog. On STM32 they live in RCC_CSR; on ESP32 esp_reset_reason() hands them over. The flags survive the restart itself and stay set until firmware clears them.
The right pattern is to read the register early in boot, log or report it, then clear it. Skip that and a watchdog reset every ten minutes looks exactly like someone yanking the power cable. A common addition is a counter in RAM that isn't zeroed on reset: three watchdog restarts in a row and the firmware drops into a safe mode or falls back to the previous image.