task_wdt: Pause hardware wdt during debugging

Enable the option to pause the fallback hardware watchdog if the MCU is
halted by a debugger.

This fixes issue #33509 where some boards with Nordic MCUs could not be
flashed anymore after using the task watchdog sample.

Signed-off-by: Martin Jäger <martin@libre.solar>
This commit is contained in:
Martin Jäger 2021-05-20 07:42:06 +02:00 committed by Kumar Gala
commit a46a36a4cf

View file

@ -131,7 +131,8 @@ int task_wdt_add(uint32_t reload_period, task_wdt_callback_t callback,
#ifdef CONFIG_TASK_WDT_HW_FALLBACK
if (!hw_wdt_started && hw_wdt_dev) {
/* also start fallback hw wdt */
wdt_setup(hw_wdt_dev, 0);
wdt_setup(hw_wdt_dev,
WDT_OPT_PAUSE_HALTED_BY_DBG);
hw_wdt_started = true;
}
#endif