spi_flash: Support select flash mode automatically at run time(Quad flash or Octal flash)

This commit is contained in:
Cao Sen Miao
2022-09-23 17:32:16 +08:00
parent 542bdea689
commit 2c9bb4eb7d
12 changed files with 170 additions and 78 deletions

View File

@@ -218,7 +218,9 @@ static esp_err_t bootloader_init_spi_flash(void)
bootloader_flash_unlock();
#if CONFIG_ESPTOOLPY_FLASHMODE_QIO || CONFIG_ESPTOOLPY_FLASHMODE_QOUT
bootloader_enable_qio_mode();
if (!bootloader_flash_is_octal_mode_enabled()) {
bootloader_enable_qio_mode();
}
#endif
print_flash_info(&bootloader_image_hdr);