mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-10-25 05:25:06 +08:00
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:
@@ -24,6 +24,7 @@
|
||||
#include "esp_system.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_task_wdt.h"
|
||||
#include "esp_image_format.h"
|
||||
|
||||
#define SPI_FLASH_ISSI_ENABLE_QIO_MODE (BIT(6))
|
||||
|
||||
@@ -744,8 +745,9 @@ void esp_spi_flash_init(uint32_t spi_speed, uint32_t spi_mode)
|
||||
}
|
||||
SET_PERI_REG_BITS(PERIPHS_SPI_FLASH_CTRL, 0xfff, freqbits, 0);
|
||||
|
||||
#ifndef CONFIG_FLASHMODE_SWITCH_TO_QIO
|
||||
if (spi_mode == 0)
|
||||
#endif
|
||||
if (spi_mode == ESP_IMAGE_SPI_MODE_QIO || spi_mode == ESP_IMAGE_SPI_MODE_QOUT) {
|
||||
user_spi_flash_dio_to_qio_pre_init();
|
||||
|
||||
ESP_EARLY_LOGI("qio_mode", "Enabling default flash chip QIO");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user