Skip to content

Commit

Permalink
drivers: uart: esp32: reset tx fifo during driver init
Browse files Browse the repository at this point in the history
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 <marcio.ribeiro@espressif.com>
(cherry picked from commit f0516ea)
  • Loading branch information
wmrsouza authored and nashif committed Dec 16, 2024
1 parent c52903c commit 73abf94
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/serial/uart_esp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,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:
Expand Down

0 comments on commit 73abf94

Please sign in to comment.