Skip to content

Commit 6dc5129

Browse files
wmrsouzadkalowsk
authored andcommitted
drivers: uart: esp32: reset tx fifo during driver init
Resets uart tx fifo during driver initialization to have a well defined initial condition mainly preventing unwanted characters being sent Signed-off-by: Marcio Ribeiro <[email protected]> (cherry picked from commit f0516ea)
1 parent d8ab599 commit 6dc5129

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/serial/uart_esp32.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ static int uart_esp32_configure(const struct device *dev, const struct uart_conf
276276
uart_hal_set_rxfifo_full_thr(&data->hal, UART_RX_FIFO_THRESH);
277277
uart_hal_set_txfifo_empty_thr(&data->hal, UART_TX_FIFO_THRESH);
278278
uart_hal_rxfifo_rst(&data->hal);
279+
uart_hal_txfifo_rst(&data->hal);
279280

280281
switch (cfg->parity) {
281282
case UART_CFG_PARITY_NONE:

0 commit comments

Comments
 (0)