From ea51d651379439c13b23981655369e78b7a97b9a Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Sat, 12 Jun 2021 15:39:37 +0200 Subject: [PATCH] serial_dump_and_reset: do not completely disable WDT Set it to 8s which is long enough to complete the dump. --- Firmware/Dcodes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Dcodes.cpp b/Firmware/Dcodes.cpp index e9ba0454..dc60fcd7 100644 --- a/Firmware/Dcodes.cpp +++ b/Firmware/Dcodes.cpp @@ -984,8 +984,8 @@ void serial_dump_and_reset(dump_crash_reason reason) SERIAL_ECHOPGM("reason: "); SERIAL_ECHOLN((unsigned)reason); - // disable interrupts from now on to avoid wdt while dumping - wdt_disable(); + // set WDT long enough to allow writing the entire stream + wdt_enable(WDTO_8S); print_mem(0, RAMEND+1, dcode_mem_t::sram); SERIAL_ECHOLNRPGM(MSG_OK);