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.
This commit is contained in:
parent
083f7c8891
commit
8c618773b5
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue