mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-30 19:52:13 +01:00
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
a05a0d531b
commit
067cca7baa
@ -111,7 +111,7 @@ bool WEAK CDC_Setup(Setup& setup)
|
|||||||
// Serial1.print(">"); Serial1.println(_usbLineInfo.lineState, HEX);
|
// Serial1.print(">"); Serial1.println(_usbLineInfo.lineState, HEX);
|
||||||
if ((_usbLineInfo.lineState & 0x01) == 0) {
|
if ((_usbLineInfo.lineState & 0x01) == 0) {
|
||||||
*(uint16_t *)0x0A00 = 0x7777;
|
*(uint16_t *)0x0A00 = 0x7777;
|
||||||
wdt_enable(WDTO_250MS);
|
wdt_enable(WDTO_120MS);
|
||||||
} else {
|
} else {
|
||||||
// Most OSs do some intermediate steps when configuring ports and DTR can
|
// Most OSs do some intermediate steps when configuring ports and DTR can
|
||||||
// twiggle more than once before stabilizing.
|
// twiggle more than once before stabilizing.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user