Skip to content

Commit cfeafe5

Browse files
martinjaegercarlescufi
authored andcommitted
[nrf fromtree] 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 <[email protected]> cherry-picked from: a46a36a Signed-off-by: Maciej Perkowski [email protected]
1 parent 683d25d commit cfeafe5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/task_wdt/task_wdt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ int task_wdt_add(uint32_t reload_period, task_wdt_callback_t callback,
131131
#ifdef CONFIG_TASK_WDT_HW_FALLBACK
132132
if (!hw_wdt_started && hw_wdt_dev) {
133133
/* also start fallback hw wdt */
134-
wdt_setup(hw_wdt_dev, 0);
134+
wdt_setup(hw_wdt_dev,
135+
WDT_OPT_PAUSE_HALTED_BY_DBG);
135136
hw_wdt_started = true;
136137
}
137138
#endif

0 commit comments

Comments
 (0)