Kconfig 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. menu "Hardware Settings"
  2. orsource "./port/$IDF_TARGET/Kconfig.spiram"
  3. menu "MAC Config"
  4. config ESP_MAC_ADDR_UNIVERSE_WIFI_STA
  5. bool
  6. config ESP_MAC_ADDR_UNIVERSE_WIFI_AP
  7. bool
  8. config ESP_MAC_ADDR_UNIVERSE_BT
  9. bool
  10. config ESP_MAC_ADDR_UNIVERSE_ETH
  11. bool
  12. # Insert chip-specific MAC config
  13. rsource "./port/$IDF_TARGET/Kconfig.mac"
  14. endmenu
  15. menu "Sleep Config"
  16. # This is here since this option affect behavior of esp_light_sleep_start
  17. # regardless of power management configuration.
  18. config ESP_SLEEP_POWER_DOWN_FLASH
  19. bool "Power down flash in light sleep when there is no SPIRAM"
  20. depends on !SPIRAM
  21. default y
  22. help
  23. If enabled, chip will try to power down flash as part of esp_light_sleep_start(), which costs
  24. more time when chip wakes up. Can only be enabled if there is no SPIRAM configured.
  25. This option will in fact consider VDD_SDIO auto power value (ESP_PD_OPTION_AUTO) as OFF. Also, it is
  26. possible to force a power domain to stay ON during light sleep by using esp_sleep_pd_config()
  27. function.
  28. config ESP_SLEEP_RTC_BUS_ISO_WORKAROUND
  29. bool
  30. default y if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  31. config ESP_SLEEP_GPIO_RESET_WORKAROUND
  32. bool "light sleep GPIO reset workaround"
  33. default y if IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  34. select PM_SLP_DISABLE_GPIO if FREERTOS_USE_TICKLESS_IDLE
  35. help
  36. esp32c2, esp32c3 and esp32s3 will reset at wake-up if GPIO is received a small electrostatic
  37. pulse during light sleep, with specific condition
  38. - GPIO needs to be configured as input-mode only
  39. - The pin receives a small electrostatic pulse, and reset occurs when the pulse
  40. voltage is higher than 6 V
  41. For GPIO set to input mode only, it is not a good practice to leave it open/floating,
  42. The hardware design needs to controlled it with determined supply or ground voltage
  43. is necessary.
  44. This option provides a software workaround for this issue. Configure to isolate all
  45. GPIO pins in sleep state.
  46. config ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND
  47. bool "PSRAM leakage current workaround in light sleep"
  48. depends on SPIRAM
  49. help
  50. When the CS pin of SPIRAM is not pulled up, the sleep current will
  51. increase during light sleep. If the CS pin of SPIRAM has an external
  52. pull-up, you do not need to select this option, otherwise, you
  53. should enable this option.
  54. config ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND
  55. bool "Flash leakage current workaround in light sleep"
  56. help
  57. When the CS pin of Flash is not pulled up, the sleep current will
  58. increase during light sleep. If the CS pin of Flash has an external
  59. pull-up, you do not need to select this option, otherwise, you
  60. should enable this option.
  61. config ESP_SLEEP_DEEP_SLEEP_WAKEUP_DELAY
  62. int "Extra delay in deep sleep wake stub (in us)"
  63. depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
  64. default 2000
  65. range 0 5000
  66. help
  67. When the chip exits deep sleep, the CPU and the flash chip are powered on
  68. at the same time. CPU will run deep sleep stub first, and then
  69. proceed to load code from flash. Some flash chips need sufficient
  70. time to pass between power on and first read operation. By default,
  71. without any extra delay, this time is approximately 900us, although
  72. some flash chip types need more than that.
  73. By default extra delay is set to 2000us. When optimizing startup time
  74. for applications which require it, this value may be reduced.
  75. If you are seeing "flash read err, 1000" message printed to the
  76. console after deep sleep reset, try increasing this value.
  77. endmenu
  78. menu "RTC Clock Config"
  79. orsource "./port/$IDF_TARGET/Kconfig.rtc"
  80. config RTC_CLOCK_BBPLL_POWER_ON_WITH_USB
  81. # This is used for configure the RTC clock.
  82. bool "Keep BBPLL clock always work"
  83. depends on ESP_CONSOLE_USB_SERIAL_JTAG || ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG
  84. default y
  85. help
  86. When the chip goes sleep or software reset, the clock source would change to XTAL
  87. and switch off the BBPLL clock for saving power. However, this might make the
  88. USB_SERIAL_JTAG down which depends on BBPLL as its unique clock source.
  89. Therefore, this is used for keeping bbpll clock always on when USB_SERIAL_JTAG PORT is using.
  90. If you want to use USB_SERIAL_JTAG under sw_reset case or sleep-wakeup case, you shoule select
  91. this option. But be aware that this might increase the power consumption.
  92. endmenu
  93. menu "Peripheral Control"
  94. config PERIPH_CTRL_FUNC_IN_IRAM
  95. bool "Place peripheral control functions into IRAM"
  96. default n
  97. help
  98. Place peripheral control functions (e.g. periph_module_reset) into IRAM,
  99. so that these functions can be IRAM-safe and able to be called in the other IRAM interrupt context.
  100. endmenu
  101. menu "MMU Config"
  102. # This Config is used for configure the MMU.
  103. # Be configured based on flash size selection.
  104. # Invisible to users.
  105. config MMU_PAGE_SIZE_16KB
  106. bool
  107. default y if IDF_TARGET_ESP32C2 && ESPTOOLPY_FLASHSIZE_1MB
  108. default n
  109. config MMU_PAGE_SIZE_32KB
  110. bool
  111. default y if IDF_TARGET_ESP32C2 && ESPTOOLPY_FLASHSIZE_2MB
  112. default n
  113. config MMU_PAGE_SIZE_64KB
  114. bool
  115. default y if !MMU_PAGE_SIZE_32KB && !MMU_PAGE_SIZE_16KB
  116. default n
  117. config MMU_PAGE_MODE
  118. string
  119. default "16KB" if MMU_PAGE_SIZE_16KB
  120. default "32KB" if MMU_PAGE_SIZE_32KB
  121. default "64KB" if MMU_PAGE_SIZE_64KB
  122. config MMU_PAGE_SIZE
  123. # Some chips support different flash MMU page sizes: 64k, 32k, 16k.
  124. # Since the number of MMU pages is limited, the maximum flash size supported
  125. # for each page size is reduced proportionally: 4 MB, 2MB, 1MB. To make best
  126. # use of small flash sizes (reducing the wasted space due to alignment), we
  127. # need to use the smallest possible MMU page size for the given flash size.
  128. hex
  129. default 0x4000 if MMU_PAGE_SIZE_16KB
  130. default 0x8000 if MMU_PAGE_SIZE_32KB
  131. default 0x10000 if MMU_PAGE_SIZE_64KB
  132. endmenu
  133. # Insert chip-specific HW config
  134. orsource "./port/$IDF_TARGET/Kconfig.hw_support"
  135. endmenu