Skip to content

Commit 44ca2ee

Browse files
bertmelisme-no-dev
authored andcommitted
Fix uart TX flushing (#2029)
wait for FSM to return idle
1 parent af79e18 commit 44ca2ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: cores/esp32/esp32-hal-uart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ void uartFlush(uart_t* uart)
333333
}
334334

335335
UART_MUTEX_LOCK();
336-
while(uart->dev->status.txfifo_cnt);
336+
while(uart->dev->status.txfifo_cnt || uart->dev->status.st_utx_out);
337337

338338
//Due to hardware issue, we can not use fifo_rst to reset uart fifo.
339339
//See description about UART_TXFIFO_RST and UART_RXFIFO_RST in <<esp32_technical_reference_manual>> v2.6 or later.

0 commit comments

Comments
 (0)