spi_flash: Add auto-suspend mode for ESP32-S2

Uses HW auto_wait_idle, HW auto_suspend and SW resume
This commit is contained in:
KonstantinKondrashov
2020-05-10 17:32:07 +08:00
committed by Cao Sen Miao
parent afef16c2e9
commit 60e58eaddb
5 changed files with 21 additions and 0 deletions

View File

@@ -255,6 +255,10 @@ esp_err_t esp_flash_init_default_chip(void)
return err;
}
#ifdef CONFIG_SPI_FLASH_AUTO_SUSPEND
spi_flash_hal_setup_auto_suspend_mode(default_chip.host);
#endif
// ROM TODO: account for non-standard default pins in efuse
// ROM TODO: to account for chips which are slow to power on, maybe keep probing in a loop here
err = esp_flash_init(&default_chip);