diff --git a/components/spi_flash/Kconfig b/components/spi_flash/Kconfig index 0560ed937e..1383f8b79d 100644 --- a/components/spi_flash/Kconfig +++ b/components/spi_flash/Kconfig @@ -74,6 +74,7 @@ menu "SPI Flash driver" choice SPI_FLASH_DANGEROUS_WRITE bool "Writing to dangerous flash regions" + default SPI_FLASH_DANGEROUS_WRITE_ALLOWED if APP_BUILD_TYPE_RAM default SPI_FLASH_DANGEROUS_WRITE_ABORTS help SPI flash APIs can optionally abort or return a failure code diff --git a/docs/en/api-reference/peripherals/spi_flash/spi_flash_idf_vs_rom.rst b/docs/en/api-reference/peripherals/spi_flash/spi_flash_idf_vs_rom.rst index 43a3ca7878..a51d0315d6 100644 --- a/docs/en/api-reference/peripherals/spi_flash/spi_flash_idf_vs_rom.rst +++ b/docs/en/api-reference/peripherals/spi_flash/spi_flash_idf_vs_rom.rst @@ -19,6 +19,7 @@ Feature Supported by ESP-IDF but not in Chip-ROM - :ref:`CONFIG_SPI_FLASH_VERIFY_WRITE`, enabling this option helps you detect bad writing. - :ref:`CONFIG_SPI_FLASH_LOG_FAILED_WRITE`, enabling this option will print the bad writing. - :ref:`CONFIG_SPI_FLASH_WARN_SETTING_ZERO_TO_ONE`, enabling this option will check if you're writing zero to one. + - :ref:`CONFIG_SPI_FLASH_DANGEROUS_WRITE`, enabling this option will check for flash programming to certain protected regions like bootloader, partition table or application itself. :esp32h2 or esp32c6: - Flash MMAP driver isn't ready in Chip-ROM.