mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
Merge branch 'bugfix/esp32s2_startup_garbled_output_v4.3' into 'release/v4.3'
esp_system: fix garbled UART output on startup on esp32s2 (v4.3) See merge request espressif/esp-idf!18751
This commit is contained in:
@@ -81,6 +81,12 @@ static void select_rtc_slow_clk(slow_clk_sel_t slow_clk);
|
|||||||
rst_reas = rtc_get_reset_reason(0);
|
rst_reas = rtc_get_reset_reason(0);
|
||||||
if (rst_reas == POWERON_RESET) {
|
if (rst_reas == POWERON_RESET) {
|
||||||
cfg.cali_ocode = 1;
|
cfg.cali_ocode = 1;
|
||||||
|
/* 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) {
|
||||||
|
esp_rom_uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
rtc_init(cfg);
|
rtc_init(cfg);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user