feat(spi_flash): Flash firmware by DIO mode if configuration is "DIO", "QIO" or "QOUT"

System(bootloader or app) switches to QIO mode if configuration is "QIO" or "QOUT".
This commit is contained in:
Dong Heng
2018-12-19 11:34:02 +08:00
parent 01d32b73d4
commit 0f62a9ce6b
3 changed files with 15 additions and 15 deletions

View File

@@ -619,12 +619,16 @@ static esp_err_t bootloader_main()
return ESP_FAIL;
}
update_flash_config(&fhdr);
ESP_LOGI(TAG, "ESP-IDF %s 2nd stage bootloader", IDF_VER);
ESP_LOGI(TAG, "compile time " __TIME__ );
#if defined(CONFIG_FLASHMODE_QIO) || defined(CONFIG_FLASHMODE_QOUT)
fhdr.spi_mode = CONFIG_SPI_FLASH_MODE;
#endif
update_flash_config(&fhdr);
print_flash_info(&fhdr);
return ESP_OK;