Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5e89e50

Browse files
authoredMar 18, 2024
fix: UART0 boot pin setup (#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
 

‎cores/esp32/HardwareSerial.cpp

Lines changed: 2 additions & 0 deletions
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)
Please sign in to comment.