Skip to content

Commit

Permalink
task_wdt: Pause hardware wdt during debugging
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
martinjaeger authored and galak committed May 21, 2021
1 parent 784e684 commit a46a36a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subsys/task_wdt/task_wdt.c
Expand Up @@ -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
Expand Down

0 comments on commit a46a36a

Please sign in to comment.