Commit 6dc51290 authored by Marcio Ribeiro's avatar Marcio Ribeiro Committed by Dan Kalowsky
Browse files

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: default avatarMarcio Ribeiro <marcio.ribeiro@espressif.com>
(cherry picked from commit f0516ead)
parent d8ab599e
Loading
Loading
Loading
Loading
+1 −0
Changes for drivers/serial/uart_esp32.c: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -276,6 +276,7 @@ static int uart_esp32_configure(const struct device *dev, const struct uart_conf
	uart_hal_set_rxfifo_full_thr(&data->hal, UART_RX_FIFO_THRESH);
	uart_hal_set_txfifo_empty_thr(&data->hal, UART_TX_FIFO_THRESH);
	uart_hal_rxfifo_rst(&data->hal);
	uart_hal_txfifo_rst(&data->hal);

	switch (cfg->parity) {
	case UART_CFG_PARITY_NONE: