From various pages I copied together this code to read the reset reason:
#include <hal/nrf_power.h> uint32_t reset_reason = nrf_power_resetreas_get(NRF_POWER)); nrf_power_resetreas_clear(NRF_POWER, reset_reason);
However, I believe most of those pages were for nRF5 SDK. (It's not always clear.)
Is this still the recommended solution in nRF Connect SDK? Specifically, I want to detect a watchdog reset.