Kconfig 16 KB

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