Commit 44ca2ee9 authored by Bert Melis's avatar Bert Melis Committed by Me No Dev

Fix uart TX flushing (#2029)

wait for FSM to return idle
parent af79e18e
...@@ -333,7 +333,7 @@ void uartFlush(uart_t* uart) ...@@ -333,7 +333,7 @@ void uartFlush(uart_t* uart)
} }
UART_MUTEX_LOCK(); UART_MUTEX_LOCK();
while(uart->dev->status.txfifo_cnt); while(uart->dev->status.txfifo_cnt || uart->dev->status.st_utx_out);
//Due to hardware issue, we can not use fifo_rst to reset uart fifo. //Due to hardware issue, we can not use fifo_rst to reset uart fifo.
//See description about UART_TXFIFO_RST and UART_RXFIFO_RST in <<esp32_technical_reference_manual>> v2.6 or later. //See description about UART_TXFIFO_RST and UART_RXFIFO_RST in <<esp32_technical_reference_manual>> v2.6 or later.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment