Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. menu "Hardware Settings"
  2. menu "Chip revision"
  3. # Insert chip-specific HW config
  4. orsource "./port/$IDF_TARGET/Kconfig.hw_support"
  5. config ESP_REV_NEW_CHIP_TEST
  6. bool "Internal test mode"
  7. depends on IDF_CI_BUILD
  8. default n
  9. help
  10. For internal chip testing, a small number of new versions chips didn't
  11. update the version field in eFuse, you can enable this option to force the
  12. software recognize the chip version based on the rev selected in menuconfig.
  13. endmenu
  14. orsource "./port/$IDF_TARGET/Kconfig.spiram"
  15. menu "MAC Config"
  16. config ESP_MAC_ADDR_UNIVERSE_WIFI_STA
  17. bool
  18. config ESP_MAC_ADDR_UNIVERSE_WIFI_AP
  19. bool
  20. config ESP_MAC_ADDR_UNIVERSE_BT
  21. bool
  22. config ESP_MAC_ADDR_UNIVERSE_ETH
  23. bool
  24. config ESP_MAC_ADDR_UNIVERSE_IEEE802154
  25. bool
  26. config ESP_MAC_UNIVERSAL_MAC_ADDRESSES_ONE
  27. bool
  28. config ESP_MAC_UNIVERSAL_MAC_ADDRESSES_TWO
  29. bool
  30. config ESP_MAC_UNIVERSAL_MAC_ADDRESSES_FOUR
  31. bool
  32. # Insert chip-specific MAC config
  33. orsource "./port/$IDF_TARGET/Kconfig.mac"
  34. config ESP_MAC_IGNORE_MAC_CRC_ERROR
  35. bool "Ignore MAC CRC error (not recommended)"
  36. depends on IDF_TARGET_ESP32
  37. default n
  38. help
  39. If you have an invalid MAC CRC (ESP_ERR_INVALID_CRC) problem
  40. and you still want to use this chip, you can enable this option to bypass such an error.
  41. This applies to both MAC_FACTORY and CUSTOM_MAC efuses.
  42. endmenu
  43. menu "Sleep Config"
  44. # This is here since this option affect behavior of esp_light_sleep_start
  45. # regardless of power management configuration.
  46. config ESP_SLEEP_POWER_DOWN_FLASH
  47. bool "Power down flash in light sleep when there is no SPIRAM"
  48. depends on !SPIRAM
  49. default n
  50. help
  51. If enabled, chip will try to power down flash as part of esp_light_sleep_start(), which costs
  52. more time when chip wakes up. Can only be enabled if there is no SPIRAM configured.
  53. This option will power down flash under a strict but relatively safe condition. Also, it is possible to
  54. power down flash under a relaxed condition by using esp_sleep_pd_config() to set ESP_PD_DOMAIN_VDDSDIO
  55. to ESP_PD_OPTION_OFF. It should be noted that there is a risk in powering down flash, you can refer
  56. `ESP-IDF Programming Guide/API Reference/System API/Sleep Modes/Power-down of Flash` for more details.
  57. config ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND
  58. bool "Pull-up Flash CS pin in light sleep"
  59. depends on !APP_BUILD_TYPE_PURE_RAM_APP && !ESP_SLEEP_POWER_DOWN_FLASH
  60. default y
  61. help
  62. All IOs will be set to isolate(floating) state by default during sleep.
  63. Since the power supply of SPI Flash is not lost during lightsleep, if its CS pin is recognized as
  64. low level(selected state) in the floating state, there will be a large current leakage, and the
  65. data in Flash may be corrupted by random signals on other SPI pins.
  66. Select this option will set the CS pin of Flash to PULL-UP state during sleep, but this will
  67. increase the sleep current about 10 uA.
  68. If you are developing with esp32xx modules, you must select this option, but if you are developing
  69. with chips, you can also pull up the CS pin of SPI Flash in the external circuit to save power
  70. consumption caused by internal pull-up during sleep.
  71. (!!! Don't deselect this option if you don't have external SPI Flash CS pin pullups.)
  72. config ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND
  73. bool "Pull-up PSRAM CS pin in light sleep"
  74. depends on SPIRAM
  75. default y
  76. help
  77. All IOs will be set to isolate(floating) state by default during sleep.
  78. Since the power supply of PSRAM is not lost during lightsleep, if its CS pin is recognized as
  79. low level(selected state) in the floating state, there will be a large current leakage, and the
  80. data in PSRAM may be corrupted by random signals on other SPI pins.
  81. Select this option will set the CS pin of PSRAM to PULL-UP state during sleep, but this will
  82. increase the sleep current about 10 uA.
  83. If you are developing with esp32xx modules, you must select this option, but if you are developing
  84. with chips, you can also pull up the CS pin of PSRAM in the external circuit to save power
  85. consumption caused by internal pull-up during sleep.
  86. (!!! Don't deselect this option if you don't have external PSRAM CS pin pullups.)
  87. config ESP_SLEEP_MSPI_NEED_ALL_IO_PU
  88. bool "Pull-up all SPI pins in light sleep"
  89. depends on !ESP_SLEEP_POWER_DOWN_FLASH \
  90. && (ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND || ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND)
  91. default y if IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32S3
  92. help
  93. To reduce leakage current, some types of SPI Flash/RAM only need to pull up the CS pin
  94. during light sleep. But there are also some kinds of SPI Flash/RAM that need to pull up
  95. all pins. It depends on the SPI Flash/RAM chip used.
  96. config ESP_SLEEP_RTC_BUS_ISO_WORKAROUND
  97. bool
  98. default y if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  99. config ESP_SLEEP_GPIO_RESET_WORKAROUND
  100. bool "light sleep GPIO reset workaround"
  101. default y if IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3 || \
  102. IDF_TARGET_ESP32C6 || IDF_TARGET_ESP32H2
  103. select PM_SLP_DISABLE_GPIO if FREERTOS_USE_TICKLESS_IDLE
  104. help
  105. esp32c2, esp32c3, esp32s3, esp32c6 and esp32h2 will reset at wake-up if GPIO is received
  106. a small electrostatic pulse during light sleep, with specific condition
  107. - GPIO needs to be configured as input-mode only
  108. - The pin receives a small electrostatic pulse, and reset occurs when the pulse
  109. voltage is higher than 6 V
  110. For GPIO set to input mode only, it is not a good practice to leave it open/floating,
  111. The hardware design needs to controlled it with determined supply or ground voltage
  112. is necessary.
  113. This option provides a software workaround for this issue. Configure to isolate all
  114. GPIO pins in sleep state.
  115. config ESP_SLEEP_DEEP_SLEEP_WAKEUP_DELAY
  116. int "Extra delay in deep sleep wake stub (in us)"
  117. depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
  118. default 2000
  119. range 0 5000
  120. help
  121. When the chip exits deep sleep, the CPU and the flash chip are powered on
  122. at the same time. CPU will run deep sleep stub first, and then
  123. proceed to load code from flash. Some flash chips need sufficient
  124. time to pass between power on and first read operation. By default,
  125. without any extra delay, this time is approximately 900us, although
  126. some flash chip types need more than that.
  127. By default extra delay is set to 2000us. When optimizing startup time
  128. for applications which require it, this value may be reduced.
  129. If you are seeing "flash read err, 1000" message printed to the
  130. console after deep sleep reset, try increasing this value.
  131. config ESP_SLEEP_CACHE_SAFE_ASSERTION
  132. bool "Check the cache safety of the sleep wakeup code in sleep process"
  133. default n
  134. help
  135. Enabling it will check the cache safety of the code before the flash power is ready after
  136. light sleep wakeup, and check PM_SLP_IRAM_OPT related code cache safety. This option is
  137. only for code quality inspection. Enabling it will increase the time overhead of entering
  138. and exiting sleep. It is not recommended to enable it in the release version.
  139. config ESP_SLEEP_DEBUG
  140. bool "esp sleep debug"
  141. default n
  142. help
  143. Enable esp sleep debug.
  144. endmenu
  145. menu "ESP_SLEEP_WORKAROUND"
  146. # No visible menu/configs for workaround
  147. visible if 0
  148. config ESP_SLEEP_SYSTIMER_STALL_WORKAROUND
  149. bool "ESP32C3 SYSTIMER Stall Issue Workaround"
  150. depends on IDF_TARGET_ESP32C3
  151. help
  152. Its not able to stall ESP32C3 systimer in sleep.
  153. To fix related RTOS TICK issue, select it to disable related systimer during sleep.
  154. TODO: IDF-7036
  155. endmenu
  156. menu "RTC Clock Config"
  157. orsource "./port/$IDF_TARGET/Kconfig.rtc"
  158. endmenu
  159. menu "Peripheral Control"
  160. config PERIPH_CTRL_FUNC_IN_IRAM
  161. bool "Place peripheral control functions into IRAM"
  162. default n
  163. help
  164. Place peripheral control functions (e.g. periph_module_reset) into IRAM,
  165. so that these functions can be IRAM-safe and able to be called in the other IRAM interrupt context.
  166. endmenu
  167. menu "ETM Configuration"
  168. depends on SOC_ETM_SUPPORTED
  169. config ETM_ENABLE_DEBUG_LOG
  170. bool "Enable debug log"
  171. default n
  172. help
  173. Wether to enable the debug log message for ETM core driver.
  174. Note that, this option only controls the ETM related driver log, won't affect other drivers.
  175. endmenu # ETM Configuration
  176. menu "GDMA Configuration"
  177. depends on SOC_GDMA_SUPPORTED
  178. config GDMA_CTRL_FUNC_IN_IRAM
  179. bool "Place GDMA control functions into IRAM"
  180. default n
  181. help
  182. Place GDMA control functions (like start/stop/append/reset) into IRAM,
  183. so that these functions can be IRAM-safe and able to be called in the other IRAM interrupt context.
  184. Enabling this option can improve driver performance as well.
  185. config GDMA_ISR_IRAM_SAFE
  186. bool "GDMA ISR IRAM-Safe"
  187. default n
  188. help
  189. This will ensure the GDMA interrupt handler is IRAM-Safe, allow to avoid flash
  190. cache misses, and also be able to run whilst the cache is disabled.
  191. (e.g. SPI Flash write).
  192. config GDMA_ENABLE_DEBUG_LOG
  193. bool "Enable debug log"
  194. default n
  195. help
  196. Wether to enable the debug log message for GDMA driver.
  197. Note that, this option only controls the GDMA driver log, won't affect other drivers.
  198. endmenu # GDMA Configuration
  199. menu "Main XTAL Config"
  200. choice XTAL_FREQ_SEL
  201. prompt "Main XTAL frequency"
  202. default XTAL_FREQ_40 if SOC_XTAL_SUPPORT_40M
  203. help
  204. This option selects the operating frequency of the XTAL (crystal) clock used to drive the ESP target.
  205. The selected value MUST reflect the frequency of the given hardware.
  206. Note: The XTAL_FREQ_AUTO option allows the ESP target to automatically estimating XTAL clock's
  207. operating frequency. However, this feature is only supported on the ESP32. The ESP32 uses the
  208. internal 8MHZ as a reference when estimating. Due to the internal oscillator's frequency being
  209. temperature dependent, usage of the XTAL_FREQ_AUTO is not recommended in applications that operate
  210. in high ambient temperatures or use high-temperature qualified chips and modules.
  211. config XTAL_FREQ_24
  212. depends on SOC_XTAL_SUPPORT_24M
  213. bool "24 MHz"
  214. config XTAL_FREQ_26
  215. depends on SOC_XTAL_SUPPORT_26M
  216. bool "26 MHz"
  217. config XTAL_FREQ_32
  218. depends on SOC_XTAL_SUPPORT_32M
  219. bool "32 MHz"
  220. config XTAL_FREQ_40
  221. depends on SOC_XTAL_SUPPORT_40M
  222. bool "40 MHz"
  223. config XTAL_FREQ_AUTO
  224. depends on SOC_XTAL_SUPPORT_AUTO_DETECT
  225. bool "Autodetect"
  226. endchoice
  227. # rtc_xtal_freq_t enum in soc/rtc.h lists the XTAL frequencies can be supported
  228. # SOC_XTAL_SUPPORT_XXX in soc_caps.h lists the XTAL frequencies already supported
  229. config XTAL_FREQ
  230. int
  231. default 24 if XTAL_FREQ_24
  232. default 26 if XTAL_FREQ_26
  233. default 32 if XTAL_FREQ_32
  234. default 40 if XTAL_FREQ_40
  235. default 0 if XTAL_FREQ_AUTO
  236. endmenu
  237. menu "Crypto DPA Protection"
  238. depends on SOC_CRYPTO_DPA_PROTECTION_SUPPORTED
  239. config ESP_CRYPTO_DPA_PROTECTION_AT_STARTUP
  240. bool "Enable crypto DPA protection at startup"
  241. default y
  242. help
  243. This config controls the DPA (Differential Power Analysis) protection
  244. knob for the crypto peripherals. DPA protection dynamically adjusts the
  245. clock frequency of the crypto peripheral. DPA protection helps to make it
  246. difficult to perform SCA attacks on the crypto peripherals. However,
  247. there is also associated performance impact based on the security level
  248. set. Please refer to the TRM for more details.
  249. choice ESP_CRYPTO_DPA_PROTECTION_LEVEL
  250. prompt "DPA protection level"
  251. depends on ESP_CRYPTO_DPA_PROTECTION_AT_STARTUP
  252. default ESP_CRYPTO_DPA_PROTECTION_LEVEL_LOW
  253. help
  254. Configure the DPA protection security level
  255. config ESP_CRYPTO_DPA_PROTECTION_LEVEL_LOW
  256. bool "Security level low"
  257. config ESP_CRYPTO_DPA_PROTECTION_LEVEL_MEDIUM
  258. bool "Security level medium"
  259. config ESP_CRYPTO_DPA_PROTECTION_LEVEL_HIGH
  260. bool "Security level high"
  261. endchoice
  262. config ESP_CRYPTO_DPA_PROTECTION_LEVEL
  263. int
  264. default 1 if ESP_CRYPTO_DPA_PROTECTION_LEVEL_LOW
  265. default 2 if ESP_CRYPTO_DPA_PROTECTION_LEVEL_MEDIUM
  266. default 3 if ESP_CRYPTO_DPA_PROTECTION_LEVEL_HIGH
  267. endmenu
  268. # Invisible bringup bypass options for esp_hw_support component
  269. config ESP_BRINGUP_BYPASS_CPU_CLK_SETTING
  270. bool
  271. default y if !SOC_CLK_TREE_SUPPORTED
  272. default n
  273. help
  274. This option is only used for new chip bringup, when
  275. clock support isn't done yet. So with this option,
  276. we use xtal on FPGA as the clock source.
  277. endmenu