You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (chip_reset_reg&VREG_AND_CHIP_RESET_CHIP_RESET_HAD_PSM_RESTART_BITS) {
74
+
reason=RESET_REASON_RESCUE_DEBUG;
75
+
}
76
+
77
+
if (chip_reset_reg&VREG_AND_CHIP_RESET_CHIP_RESET_HAD_RUN_BITS) {
78
+
reason=RESET_REASON_RESET_PIN;
79
+
}
80
+
81
+
if (chip_reset_reg&VREG_AND_CHIP_RESET_CHIP_RESET_HAD_POR_BITS) {
82
+
// NOTE: This register is also used for brownout, but there is no way to differentiate between power on and brown out
83
+
reason=RESET_REASON_POWER_ON;
84
+
}
85
+
86
+
// Check watchdog after chip reset since watchdog doesn't clear chip_reset, while chip_reset clears the watchdog
87
+
88
+
if (watchdog_reset_reg&WATCHDOG_REASON_TIMER_BITS) {
89
+
// This bit can also be set during a software reset because the pico-sdk performs a software reset by setting an extremely low timeout on the watchdog, rather than triggering a watchdog reset manually
90
+
reason=RESET_REASON_WATCHDOG;
91
+
}
92
+
93
+
if (watchdog_reset_reg&WATCHDOG_REASON_FORCE_BITS) {
0 commit comments