Kconfig 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. menu "SPI Flash driver"
  2. config SPI_FLASH_VERIFY_WRITE
  3. bool "Verify SPI flash writes"
  4. default n
  5. help
  6. If this option is enabled, any time SPI flash is written then the data will be read
  7. back and verified. This can catch hardware problems with SPI flash, or flash which
  8. was not erased before verification.
  9. config SPI_FLASH_LOG_FAILED_WRITE
  10. bool "Log errors if verification fails"
  11. depends on SPI_FLASH_VERIFY_WRITE
  12. default n
  13. help
  14. If this option is enabled, if SPI flash write verification fails then a log error line
  15. will be written with the address, expected & actual values. This can be useful when
  16. debugging hardware SPI flash problems.
  17. config SPI_FLASH_WARN_SETTING_ZERO_TO_ONE
  18. bool "Log warning if writing zero bits to ones"
  19. depends on SPI_FLASH_VERIFY_WRITE
  20. default n
  21. help
  22. If this option is enabled, any SPI flash write which tries to set zero bits in the flash to
  23. ones will log a warning. Such writes will not result in the requested data appearing identically
  24. in flash once written, as SPI NOR flash can only set bits to one when an entire sector is erased.
  25. After erasing, individual bits can only be written from one to zero.
  26. Note that some software (such as SPIFFS) which is aware of SPI NOR flash may write one bits as an
  27. optimisation, relying on the data in flash becoming a bitwise AND of the new data and any existing data.
  28. Such software will log spurious warnings if this option is enabled.
  29. config SPI_FLASH_ENABLE_COUNTERS
  30. bool "Enable operation counters"
  31. default 0
  32. help
  33. This option enables the following APIs:
  34. - spi_flash_reset_counters
  35. - spi_flash_dump_counters
  36. - spi_flash_get_counters
  37. These APIs may be used to collect performance data for spi_flash APIs
  38. and to help understand behaviour of libraries which use SPI flash.
  39. config SPI_FLASH_ROM_DRIVER_PATCH
  40. bool "Enable SPI flash ROM driver patched functions"
  41. default y
  42. help
  43. Enable this flag to use patched versions of SPI flash ROM driver functions.
  44. This option is needed to write to flash on ESP32-D2WD, and any configuration
  45. where external SPI flash is connected to non-default pins.
  46. choice SPI_FLASH_DANGEROUS_WRITE
  47. bool "Writing to dangerous flash regions"
  48. default SPI_FLASH_DANGEROUS_WRITE_ABORTS
  49. help
  50. SPI flash APIs can optionally abort or return a failure code
  51. if erasing or writing addresses that fall at the beginning
  52. of flash (covering the bootloader and partition table) or that
  53. overlap the app partition that contains the running app.
  54. It is not recommended to ever write to these regions from an IDF app,
  55. and this check prevents logic errors or corrupted firmware memory from
  56. damaging these regions.
  57. Note that this feature *does not* check calls to the esp_rom_xxx SPI flash
  58. ROM functions. These functions should not be called directly from IDF
  59. applications.
  60. config SPI_FLASH_DANGEROUS_WRITE_ABORTS
  61. bool "Aborts"
  62. config SPI_FLASH_DANGEROUS_WRITE_FAILS
  63. bool "Fails"
  64. config SPI_FLASH_DANGEROUS_WRITE_ALLOWED
  65. bool "Allowed"
  66. endchoice
  67. config SPI_FLASH_USE_LEGACY_IMPL
  68. bool "Use the legacy implementation before IDF v4.0"
  69. default n
  70. help
  71. The implementation of SPI flash has been greatly changed in IDF v4.0.
  72. Enable this option to use the legacy implementation.
  73. menu "Auto-detect flash chips"
  74. config SPI_FLASH_SUPPORT_ISSI_CHIP
  75. bool "ISSI"
  76. default y
  77. help
  78. Enable this to support auto detection of ISSI chips if chip vendor not directly
  79. given by ``chip_drv`` member of the chip struct. This adds support for variant
  80. chips, however will extend detecting time.
  81. config SPI_FLASH_SUPPORT_GD_CHIP
  82. bool "GigaDevice"
  83. default y
  84. help
  85. Enable this to support auto detection of GD (GigaDevice) chips if chip vendor not
  86. directly given by ``chip_drv`` member of the chip struct. If you are using Wrover
  87. modules, please don't disable this, otherwise your flash may not work in 4-bit
  88. mode.
  89. This adds support for variant chips, however will extend detecting time and image
  90. size. Note that the default chip driver supports the GD chips with product ID
  91. 60H.
  92. endmenu #auto detect flash chips
  93. endmenu