Merge branch 'bugfix/esp32s2_startup_garbled_output_v4.2' into 'release/v4.2'

esp_system: fix garbled UART output on startup on esp32s2 (v4.2)

See merge request espressif/esp-idf!18752
release/v4.2
Marius Vikhammer 2023-05-18 13:05:57 +08:00
commit fe907a6c39
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -82,6 +82,12 @@ void esp_clk_init(void)
RESET_REASON rst_reas;
rst_reas = rtc_get_reset_reason(0);
if (rst_reas == POWERON_RESET) {
/* Ocode calibration will switch to XTAL frequency, need to wait for UART FIFO
* to be empty, to avoid garbled output.
*/
if (CONFIG_ESP_CONSOLE_UART_NUM >= 0) {
uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM);
}
cfg.cali_ocode = 1;
}
rtc_init(cfg);