From dfda84c2ab229d8c6cc5e78f42aa6e1a14f11f76 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Mon, 1 Feb 2021 14:23:53 +1100 Subject: [PATCH] esp_system: Fix some ESP_EARLY_LOG lines not being output fully At least on ESP32, calling esp_rom_uart_set_clock_baudrate() causes the contents of the UART FIFO to be discarded. --- components/esp_system/port/cpu_start.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/esp_system/port/cpu_start.c b/components/esp_system/port/cpu_start.c index 9461f673f6..beca4ae893 100644 --- a/components/esp_system/port/cpu_start.c +++ b/components/esp_system/port/cpu_start.c @@ -456,6 +456,7 @@ void IRAM_ATTR call_start_cpu0(void) #if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 clock_hz = UART_CLK_FREQ_ROM; // From esp32-s3 on, UART clock source is selected to XTAL in ROM #endif + esp_rom_uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM); esp_rom_uart_set_clock_baudrate(CONFIG_ESP_CONSOLE_UART_NUM, clock_hz, CONFIG_ESP_CONSOLE_UART_BAUDRATE); #endif