Skip to content

Commit 5e89e50

Browse files
authored
fix: UART0 boot pin setup (espressif#9373)
UART0 pins are set by ROM Boot to default values. This must be reflected into Arduino HardwareSerial in order to allow it to correctly detach it and then attach it to something else. Summary: UART0 constructor sets default RX/TX pins as done in boot time.
1 parent 2dcb28f commit 5e89e50

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: cores/esp32/HardwareSerial.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ _eventTask(NULL)
9999
}
100100
}
101101
#endif
102+
// do the same as boot time, that will set default UART0 pins RX, TX.
103+
if(uart_nr == 0) uartSetPins(0, SOC_RX0, SOC_TX0, -1, -1);
102104
}
103105

104106
HardwareSerial::~HardwareSerial()

0 commit comments

Comments
 (0)