diff --git a/components/soc/esp32s2/include/soc/spi_mem_struct.h b/components/soc/esp32s2/include/soc/spi_mem_struct.h index ee318c20f1..4ca11b2e95 100644 --- a/components/soc/esp32s2/include/soc/spi_mem_struct.h +++ b/components/soc/esp32s2/include/soc/spi_mem_struct.h @@ -266,7 +266,7 @@ typedef volatile struct spi_mem_dev_s { }; uint32_t val; } fsm; - uint32_t data_buf[18]; /*data buffer*/ + uint32_t data_buf[16]; /*data buffer*/ union { struct { uint32_t waiti_en: 1; /*auto-waiting flash idle operation when program flash or erase flash. 1: enable 0: disable.*/ diff --git a/components/spi_flash/Kconfig b/components/spi_flash/Kconfig index 738e8e542f..916dd8c49c 100644 --- a/components/spi_flash/Kconfig +++ b/components/spi_flash/Kconfig @@ -124,6 +124,7 @@ menu "SPI Flash driver" config SPI_FLASH_YIELD_DURING_ERASE bool "Enables yield operation during flash erase" default y + depends on SPI_FLASH_USE_LEGACY_IMPL help This allows to yield the CPUs between erase commands. Prevents starvation of other tasks. @@ -137,7 +138,7 @@ menu "SPI Flash driver" then it will yield CPUs after finishing a current command. config SPI_FLASH_ERASE_YIELD_TICKS - int "CPU release time (tick)" + int "CPU release time (tick) for an erase operation" depends on SPI_FLASH_YIELD_DURING_ERASE default 1 help diff --git a/components/spi_flash/private_include/spi_flash_defs.h b/components/spi_flash/private_include/spi_flash_defs.h index 3d07eb1353..372a4cd4e2 100644 --- a/components/spi_flash/private_include/spi_flash_defs.h +++ b/components/spi_flash/private_include/spi_flash_defs.h @@ -47,6 +47,8 @@ #define CMD_LARGE_BLOCK_ERASE_4B 0xDC /* 64KB block erase command */ #define CMD_PROGRAM_PAGE 0x02 #define CMD_PROGRAM_PAGE_4B 0x12 +#define CMD_SUSPEND 0x75 +#define CMD_RESUME 0x7A #define CMD_RST_EN 0x66 #define CMD_RST_DEV 0x99