File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -744,9 +744,13 @@ static volatile uint32_t& bl_crashcounter = *(RTC_USER_MEM + 33);
744744static volatile uint32_t & bl_actiontracker = *(RTC_USER_MEM + 34 );
745745
746746static inline ResetReason rebootReason () {
747- rst_info* resetreason = system_get_rst_info ();
748- if (resetreason->reason == REASON_EXCEPTION_RST || resetreason->reason == REASON_WDT_RST) return ResetReason::Crash;
749- if (resetreason->reason == REASON_SOFT_RESTART) return ResetReason::Software;
747+ uint32_t resetReason = system_get_rst_info ()->reason ;
748+ if (resetReason == REASON_EXCEPTION_RST
749+ || resetReason == REASON_WDT_RST
750+ || resetReason == REASON_SOFT_WDT_RST)
751+ return ResetReason::Crash;
752+ if (resetReason == REASON_SOFT_RESTART)
753+ return ResetReason::Software;
750754 return ResetReason::Power;
751755}
752756
You can’t perform that action at this time.
0 commit comments