Skip to content

Commit dbaf844

Browse files
committed
fixed logic bug in Caterina that could stop the bootloader from entering self-programming mode
1 parent 4e9e1cb commit dbaf844

File tree

1 file changed

+2
-3
lines changed
  • hardware/arduino/cores/arduino

1 file changed

+2
-3
lines changed

hardware/arduino/cores/arduino/CDC.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,8 @@ bool WEAK CDC_Setup(Setup& setup)
108108
// like servicing endpoints before the sketch ends
109109
if (1200 == _usbLineInfo.dwDTERate) {
110110
// We check DTR state to determine if host port is open (bit 0 of lineState).
111-
// Serial1.print(">"); Serial1.println(_usbLineInfo.lineState, HEX);
112111
if ((_usbLineInfo.lineState & 0x01) == 0) {
113-
*(uint16_t *)0x0A00 = 0x7777;
112+
*(uint16_t *)0x0800 = 0x7777;
114113
wdt_enable(WDTO_120MS);
115114
} else {
116115
// Most OSs do some intermediate steps when configuring ports and DTR can
@@ -120,7 +119,7 @@ bool WEAK CDC_Setup(Setup& setup)
120119

121120
wdt_disable();
122121
wdt_reset();
123-
*(uint16_t *)0x0A00 = 0x0;
122+
*(uint16_t *)0x0800 = 0x0;
124123
}
125124
}
126125
return true;

0 commit comments

Comments
 (0)