Skip to content

Commit 81b7c47

Browse files
authored
Serial::end hang (espressif#5047)
workaround for espressif#5043. There is a timing issue with HardwareSerial::end. I'm not sure what is hung, but it should be possible to see this in jtag, as it does cause a reboot if you let it. The delay needs to be before you detach the device!?
1 parent e6ba8c7 commit 81b7c47

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: cores/esp32/HardwareSerial.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ void HardwareSerial::end()
117117
if(uartGetDebug() == _uart_nr) {
118118
uartSetDebug(0);
119119
}
120+
delay(10);
120121
log_v("pins %d %d",_tx_pin, _rx_pin);
121122
uartEnd(_uart, _tx_pin, _rx_pin);
122123
_uart = 0;

0 commit comments

Comments
 (0)