summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2020-12-01 18:15:06 -0800
committerScott Shawcroft <scott@tannewt.org>2020-12-01 18:15:06 -0800
commit73e22f9eeb2b02fcf4c39b62ddbabffe6db21199 (patch)
tree1fc69cfe0ee4e8290baeb704badfb947d5dbacab
parent5b3c930e384ef6440f0f7b5167bb54ea68a8be76 (diff)
Block all tasks (not interrupts) during flash erase
Otherwise we risk running code from flash while an erase is in progress, crashing and corrupting the file system. Related to #3744
-rw-r--r--ports/esp32s2/esp-idf-config/sdkconfig.defaults6
1 files changed, 2 insertions, 4 deletions
diff --git a/ports/esp32s2/esp-idf-config/sdkconfig.defaults b/ports/esp32s2/esp-idf-config/sdkconfig.defaults
index 025b05caa..2c53da108 100644
--- a/ports/esp32s2/esp-idf-config/sdkconfig.defaults
+++ b/ports/esp32s2/esp-idf-config/sdkconfig.defaults
@@ -717,10 +717,8 @@ CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set
# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set
# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set
-CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y
-CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20
-CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1
-CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192
+# CONFIG_SPI_FLASH_YIELD_DURING_ERASE is not set
+CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096
# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set
#