From 8c618773b56a302b9fda0a0c14da34e09bba25fa Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Wed, 14 Mar 2012 18:17:22 -0400 Subject: reduced delay before starting the Leonardo bootloader Since we use a magic RAM flag to signal to the bootloader there's a risk of the sketch overwriting the magic RAM location before the bootloader starts. By reducing the watchdog timeout we reduce the chance of this happening. --- cores/arduino/CDC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cores/arduino') diff --git a/cores/arduino/CDC.cpp b/cores/arduino/CDC.cpp index 94faf2e..7206aa6 100644 --- a/cores/arduino/CDC.cpp +++ b/cores/arduino/CDC.cpp @@ -111,7 +111,7 @@ bool WEAK CDC_Setup(Setup& setup) // Serial1.print(">"); Serial1.println(_usbLineInfo.lineState, HEX); if ((_usbLineInfo.lineState & 0x01) == 0) { *(uint16_t *)0x0A00 = 0x7777; - wdt_enable(WDTO_250MS); + wdt_enable(WDTO_120MS); } else { // Most OSs do some intermediate steps when configuring ports and DTR can // twiggle more than once before stabilizing. -- cgit v1.2.3-18-g5258