Merge branch 'bugfix/fix_uart_driver_missing_txfifo_reset_issue' into 'master'

bugfix(UART):  fix uart driver missing txfifo reset issue.

Closes IDFGH-2848

See merge request espressif/esp-idf!7992
pull/5052/head
Michael (XIAO Xufeng) 2020-03-27 15:55:02 +08:00
commit c91b53377b
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -631,7 +631,10 @@ esp_err_t uart_param_config(uart_port_t uart_num, const uart_config_t *uart_conf
uart_hal_set_tx_idle_num(&(uart_context[uart_num].hal), UART_TX_IDLE_NUM_DEFAULT);
uart_hal_set_hw_flow_ctrl(&(uart_context[uart_num].hal), uart_config->flow_ctrl, uart_config->rx_flow_ctrl_thresh);
UART_EXIT_CRITICAL(&(uart_context[uart_num].spinlock));
// The module reset do not reset TX and RX memory.
// reset FIFO to avoid garbage data remained in the FIFO.
uart_hal_rxfifo_rst(&(uart_context[uart_num].hal));
uart_hal_txfifo_rst(&(uart_context[uart_num].hal));
return ESP_OK;
}