From 012f9702ad490c28ad5937d10b7b0abb3f8e5ba6 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 4 Jun 2020 14:57:50 +0200 Subject: [PATCH] driver: make sure UART is idle before starting the test --- components/driver/test/test_uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/driver/test/test_uart.c b/components/driver/test/test_uart.c index cebe8001b..30da7123d 100644 --- a/components/driver/test/test_uart.c +++ b/components/driver/test/test_uart.c @@ -296,6 +296,7 @@ TEST_CASE("uart tx with ringbuffer test", "[uart]") .rx_flow_ctrl_thresh = 120, .source_clk = UART_SCLK_APB, }; + uart_wait_tx_idle_polling(uart_num); TEST_ESP_OK(uart_param_config(uart_num, &uart_config)); TEST_ESP_OK(uart_driver_install(uart_num, 1024 * 2, 1024 *2, 20, NULL, 0)); TEST_ESP_OK(uart_set_loop_back(uart_num, true));