From 88289c3fdaa7f5fa3793cd06feeb54fa31fceb44 Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Thu, 15 Jun 2023 15:27:50 +0800 Subject: [PATCH] bugfix: fix bootloader print wrong spi speed mode --- .../bootloader_flash/src/bootloader_flash_config_esp32c6.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/bootloader_support/bootloader_flash/src/bootloader_flash_config_esp32c6.c b/components/bootloader_support/bootloader_flash/src/bootloader_flash_config_esp32c6.c index a3bfb4607d..5f7367102f 100644 --- a/components/bootloader_support/bootloader_flash/src/bootloader_flash_config_esp32c6.c +++ b/components/bootloader_support/bootloader_flash/src/bootloader_flash_config_esp32c6.c @@ -200,6 +200,12 @@ esp_err_t bootloader_init_spi_flash(void) bootloader_enable_qio_mode(); #endif + // Since the workaround in IDF-6709, the spi_speed value in the bootloader header + // is not the real value, overwrite it. +#if CONFIG_ESPTOOLPY_FLASHFREQ_80M + bootloader_image_hdr.spi_speed = ESP_IMAGE_SPI_SPEED_DIV_1; +#endif + print_flash_info(&bootloader_image_hdr); update_flash_config(&bootloader_image_hdr); //ensure the flash is write-protected