Skip to content

Commit

Permalink
[nrf fromtree] samples: drivers: watchdog: Pause during debugging
Browse files Browse the repository at this point in the history
Enable the option to pause the watchdog if the MCU is halted by a
debugger.

This fixes an issue with some Nordic MCUs (see zephyrproject-rtos#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]>

cherry-picked from 784e684

Signed-off-by: Maciej Perkowski [email protected]
  • Loading branch information
martinjaeger authored and carlescufi committed Jun 16, 2021
1 parent cc81eda commit 683d25d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/drivers/watchdog/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void main(void)
return;
}

err = wdt_setup(wdt, 0);
err = wdt_setup(wdt, WDT_OPT_PAUSE_HALTED_BY_DBG);
if (err < 0) {
printk("Watchdog setup error\n");
return;
Expand Down

0 comments on commit 683d25d

Please sign in to comment.