Skip to content

Commit 784e684

Browse files
martinjaegergalak
authored andcommitted
samples: drivers: watchdog: Pause during debugging
Enable the option to pause the watchdog if the MCU is halted by a debugger. This fixes an issue with some Nordic MCUs (see #33509) where the board could not be flashed anymore if a short watchdog timeout (<100 ms) was used. Signed-off-by: Martin Jäger <[email protected]>
1 parent 2cf355f commit 784e684

File tree

1 file changed

+1
-1
lines changed
  • samples/drivers/watchdog/src

1 file changed

+1
-1
lines changed

samples/drivers/watchdog/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void main(void)
123123
return;
124124
}
125125

126-
err = wdt_setup(wdt, 0);
126+
err = wdt_setup(wdt, WDT_OPT_PAUSE_HALTED_BY_DBG);
127127
if (err < 0) {
128128
printk("Watchdog setup error\n");
129129
return;

0 commit comments

Comments
 (0)