diff --git a/components/spi_flash/esp_flash_spi_init.c b/components/spi_flash/esp_flash_spi_init.c index 1f60d03eb8..684f6f79fa 100644 --- a/components/spi_flash/esp_flash_spi_init.c +++ b/components/spi_flash/esp_flash_spi_init.c @@ -38,6 +38,10 @@ __attribute__((unused)) static const char TAG[] = "spi_flash"; +#if !CONFIG_SPI_FLASH_AUTO_SUSPEND && !CONFIG_SPI_FLASH_PLACE_FUNCTIONS_IN_IRAM +#error "CONFIG_SPI_FLASH_PLACE_FUNCTIONS_IN_IRAM cannot be disabled when CONFIG_SPI_FLASH_AUTO_SUSPEND is disabled." +#endif + #if CONFIG_SPI_FLASH_ROM_IMPL && (CONFIG_ESPTOOLPY_FLASHSIZE_32MB || CONFIG_ESPTOOLPY_FLASHSIZE_64MB || CONFIG_ESPTOOLPY_FLASHSIZE_128MB) #error "Flash chip size equal or over 32MB memory cannot use driver in ROM" #endif @@ -549,6 +553,10 @@ esp_err_t esp_flash_init_default_chip(void) cfg.auto_waiti_pes = true; #endif + #if CONFIG_SPI_FLASH_SOFTWARE_RESUME + cfg.software_resume = true; + #endif + //the host is already initialized, only do init for the data and load it to the host esp_err_t err = memspi_host_init_pointers(&esp_flash_default_host, &cfg); if (err != ESP_OK) {