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 <martin@libre.solar>
This commit is contained in:
Martin Jäger 2021-05-20 07:35:33 +02:00 committed by Kumar Gala
commit 784e6847df

View file

@ -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;