Hello
in order to analyze reboot reson (HW \ SW) I use the following:
in case of kernel crash I usually get coldstack print, in this case I can analyze and understand the issue, this case is OK
in other cases I just get reset device, without any print to console
in this case I read RESETREAS register and anylize.
in case I get "DOG", ok reason is clear, but usually I get "SREQ", what does it mean?
btw, I could not find an analysis implmentation for nrf9160, so I wrote the following procedure, please varify I am not missing more options
static void log_resetreason(u32_t rr)
{
/* Reset reason */
LOG_INF("Reset reasons:");
if (0 == rr)
{
LOG_INF("- NONE");
}
if (0 != (rr & NRF_POWER_RESETREAS_RESETPIN_MASK))
{
LOG_INF("- RESETPIN");
}
if (0 != (rr & NRF_POWER_RESETREAS_DOG_MASK ))
{
LOG_INF("- DOG");
}
if (0 != (rr & NRF_POWER_RESETREAS_SREQ_MASK ))
{
LOG_INF("- SREQ");
}
if (0 != (rr & NRF_POWER_RESETREAS_LOCKUP_MASK ))
{
LOG_INF("- LOCKUP");
}
if (0 != (rr & NRF_POWER_RESETREAS_OFF_MASK ))
{
LOG_INF("- OFF");
}
if (0 != (rr & NRF_POWER_RESETREAS_DIF_MASK ))
{
LOG_INF("- DIF");
}
}
u32_t rr = nrf_power_resetreas_get(NRF_POWER);
log_resetreason(rr);