Skip to content
Snippets Groups Projects
Verified Commit c8dbb334 authored by rahix's avatar rahix
Browse files

fix(watchdog): Don't enable when debugger is connected


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 781d4129
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,13 @@ static void watchdog_clearer_callback()
void watchdog_init()
{
/*
* Don't enable the the watchdog when a debugger is connected.
*/
if ((CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) != 0) {
return;
}
sys_cfg_wdt_t wdt_cfg = NULL;
WDT_Init(MXC_WDT0, wdt_cfg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment