Serial::end hang (#5047)
workaround for #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!?
This commit is contained in:
parent
e6ba8c7ac9
commit
81b7c47203
@ -117,6 +117,7 @@ void HardwareSerial::end()
|
|||||||
if(uartGetDebug() == _uart_nr) {
|
if(uartGetDebug() == _uart_nr) {
|
||||||
uartSetDebug(0);
|
uartSetDebug(0);
|
||||||
}
|
}
|
||||||
|
delay(10);
|
||||||
log_v("pins %d %d",_tx_pin, _rx_pin);
|
log_v("pins %d %d",_tx_pin, _rx_pin);
|
||||||
uartEnd(_uart, _tx_pin, _rx_pin);
|
uartEnd(_uart, _tx_pin, _rx_pin);
|
||||||
_uart = 0;
|
_uart = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user