Skip to content

Commit 8c5df5f

Browse files
committed
supervisor: add a new WATCHDOG_RESET safe mode reason
This mode will be used if the board is reset due to the watchdog expiring. Signed-off-by: Sean Cross <[email protected]>
1 parent 08362c9 commit 8c5df5f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

supervisor/shared/safe_mode.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ void print_safe_mode_message(safe_mode_t reason) {
160160
case MEM_MANAGE:
161161
serial_write_compressed(translate("Invalid memory access."));
162162
break;
163+
case WATCHDOG_RESET:
164+
serial_write_compressed(translate("Watchdog timer expired."));
165+
break;
163166
default:
164167
serial_write_compressed(translate("Unknown reason."));
165168
break;

supervisor/shared/safe_mode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ typedef enum {
4141
NORDIC_SOFT_DEVICE_ASSERT,
4242
FLASH_WRITE_FAIL,
4343
MEM_MANAGE,
44+
WATCHDOG_RESET,
4445
} safe_mode_t;
4546

4647
safe_mode_t wait_for_safe_mode_reset(void);

0 commit comments

Comments
 (0)