Skip to content

Commit

Permalink
Fix uart TX flushing (#2029)
Browse files Browse the repository at this point in the history
wait for FSM to return idle
  • Loading branch information
bertmelis authored and me-no-dev committed Nov 19, 2018
1 parent af79e18 commit 44ca2ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cores/esp32/esp32-hal-uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void uartFlush(uart_t* uart)
}

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.
//See description about UART_TXFIFO_RST and UART_RXFIFO_RST in <<esp32_technical_reference_manual>> v2.6 or later.
Expand Down

0 comments on commit 44ca2ee

Please sign in to comment.