Kconfig 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. menu "ESP32C3-Specific"
  2. visible if IDF_TARGET_ESP32C3
  3. choice ESP32C3_DEFAULT_CPU_FREQ_MHZ
  4. prompt "CPU frequency"
  5. default ESP32C3_DEFAULT_CPU_FREQ_40 if IDF_ENV_FPGA
  6. default ESP32C3_DEFAULT_CPU_FREQ_160 if !IDF_ENV_FPGA
  7. help
  8. CPU frequency to be set on application startup.
  9. config ESP32C3_DEFAULT_CPU_FREQ_40
  10. bool "40 MHz"
  11. depends on IDF_ENV_FPGA
  12. config ESP32C3_DEFAULT_CPU_FREQ_80
  13. bool "80 MHz"
  14. config ESP32C3_DEFAULT_CPU_FREQ_160
  15. bool "160 MHz"
  16. endchoice
  17. config ESP32C3_DEFAULT_CPU_FREQ_MHZ
  18. int
  19. default 40 if ESP32C3_DEFAULT_CPU_FREQ_40
  20. default 80 if ESP32C3_DEFAULT_CPU_FREQ_80
  21. default 160 if ESP32C3_DEFAULT_CPU_FREQ_160
  22. choice ESP32C3_UNIVERSAL_MAC_ADDRESSES
  23. bool "Number of universally administered (by IEEE) MAC address"
  24. default ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
  25. help
  26. Configure the number of universally administered (by IEEE) MAC addresses.
  27. During initialization, MAC addresses for each network interface are generated or derived from a
  28. single base MAC address.
  29. If the number of universal MAC addresses is Two, all interfaces (WiFi station, WiFi softap) receive a
  30. universally administered MAC address. They are generated sequentially by adding 0, and 1 (respectively)
  31. to the final octet of the base MAC address. If the number of universal MAC addresses is one,
  32. only WiFi station receives a universally administered MAC address.
  33. It's generated by adding 0 to the base MAC address.
  34. The WiFi softap receives local MAC addresses. It's derived from the universal WiFi station MAC addresses.
  35. When using the default (Espressif-assigned) base MAC address, either setting can be used. When using
  36. a custom universal MAC address range, the correct setting will depend on the allocation of MAC
  37. addresses in this range (either 1 or 2 per device.)
  38. config ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
  39. bool "Two"
  40. select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
  41. select ESP_MAC_ADDR_UNIVERSE_BT
  42. config ESP32C3_UNIVERSAL_MAC_ADDRESSES_THREE
  43. bool "Three"
  44. select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
  45. select ESP_MAC_ADDR_UNIVERSE_WIFI_AP
  46. select ESP_MAC_ADDR_UNIVERSE_BT
  47. endchoice
  48. config ESP32C3_UNIVERSAL_MAC_ADDRESSES
  49. int
  50. default 2 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
  51. default 3 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_THREE
  52. config ESP_MAC_ADDR_UNIVERSE_BT_OFFSET
  53. int
  54. default 2 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_THREE
  55. default 1 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
  56. config ESP32C3_DEBUG_OCDAWARE
  57. bool "Make exception and panic handlers JTAG/OCD aware"
  58. default y
  59. select FREERTOS_DEBUG_OCDAWARE
  60. help
  61. The FreeRTOS panic and unhandled exception handers can detect a JTAG OCD debugger and
  62. instead of panicking, have the debugger stop on the offending instruction.
  63. config ESP32C3_DEBUG_STUBS_ENABLE
  64. bool "OpenOCD debug stubs"
  65. default COMPILER_OPTIMIZATION_LEVEL_DEBUG
  66. depends on !ESP32C3_TRAX
  67. help
  68. Debug stubs are used by OpenOCD to execute pre-compiled onboard code which does some useful debugging,
  69. e.g. GCOV data dump.
  70. config ESP32C3_BROWNOUT_DET
  71. # TODO ESP32-C3 IDF-2397
  72. bool
  73. default n
  74. help
  75. The ESP32-S3 has a built-in brownout detector which can detect if the voltage is lower than
  76. a specific value. If this happens, it will reset the chip in order to prevent unintended
  77. behaviour.
  78. choice ESP32C3_BROWNOUT_DET_LVL_SEL
  79. prompt "Brownout voltage level"
  80. depends on ESP32C3_BROWNOUT_DET
  81. default ESP32C3_BROWNOUT_DET_LVL_SEL_7
  82. help
  83. The brownout detector will reset the chip when the supply voltage is approximately
  84. below this level. Note that there may be some variation of brownout voltage level
  85. between each ESP3-S3 chip.
  86. #The voltage levels here are estimates, more work needs to be done to figure out the exact voltages
  87. #of the brownout threshold levels.
  88. config ESP32C3_BROWNOUT_DET_LVL_SEL_7
  89. bool "2.44V"
  90. config ESP32C3_BROWNOUT_DET_LVL_SEL_6
  91. bool "2.56V"
  92. config ESP32C3_BROWNOUT_DET_LVL_SEL_5
  93. bool "2.67V"
  94. config ESP32C3_BROWNOUT_DET_LVL_SEL_4
  95. bool "2.84V"
  96. config ESP32C3_BROWNOUT_DET_LVL_SEL_3
  97. bool "2.98V"
  98. config ESP32C3_BROWNOUT_DET_LVL_SEL_2
  99. bool "3.19V"
  100. config ESP32C3_BROWNOUT_DET_LVL_SEL_1
  101. bool "3.30V"
  102. endchoice
  103. config ESP32C3_BROWNOUT_DET_LVL
  104. int
  105. default 1 if ESP32C3_BROWNOUT_DET_LVL_SEL_1
  106. default 2 if ESP32C3_BROWNOUT_DET_LVL_SEL_2
  107. default 3 if ESP32C3_BROWNOUT_DET_LVL_SEL_3
  108. default 4 if ESP32C3_BROWNOUT_DET_LVL_SEL_4
  109. default 5 if ESP32C3_BROWNOUT_DET_LVL_SEL_5
  110. default 6 if ESP32C3_BROWNOUT_DET_LVL_SEL_6
  111. default 7 if ESP32C3_BROWNOUT_DET_LVL_SEL_7
  112. choice ESP32C3_TIME_SYSCALL
  113. prompt "Timers used for gettimeofday function"
  114. default ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER
  115. help
  116. This setting defines which hardware timers are used to
  117. implement 'gettimeofday' and 'time' functions in C library.
  118. - If both high-resolution (systimer) and RTC timers are used, timekeeping will
  119. continue in deep sleep. Time will be reported at 1 microsecond
  120. resolution. This is the default, and the recommended option.
  121. - If only high-resolution timer (systimer) is used, gettimeofday will
  122. provide time at microsecond resolution.
  123. Time will not be preserved when going into deep sleep mode.
  124. - If only RTC timer is used, timekeeping will continue in
  125. deep sleep, but time will be measured at 6.(6) microsecond
  126. resolution. Also the gettimeofday function itself may take
  127. longer to run.
  128. - If no timers are used, gettimeofday and time functions
  129. return -1 and set errno to ENOSYS.
  130. - When RTC is used for timekeeping, two RTC_STORE registers are
  131. used to keep time in deep sleep mode.
  132. config ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER
  133. bool "RTC and high-resolution timer"
  134. select ESP_TIME_FUNCS_USE_RTC_TIMER
  135. select ESP_TIME_FUNCS_USE_ESP_TIMER
  136. config ESP32C3_TIME_SYSCALL_USE_RTC
  137. bool "RTC"
  138. select ESP_TIME_FUNCS_USE_RTC_TIMER
  139. config ESP32C3_TIME_SYSCALL_USE_SYSTIMER
  140. bool "High-resolution timer"
  141. select ESP_TIME_FUNCS_USE_ESP_TIMER
  142. config ESP32C3_TIME_SYSCALL_USE_NONE
  143. bool "None"
  144. select ESP_TIME_FUNCS_USE_NONE
  145. endchoice
  146. choice ESP32C3_RTC_CLK_SRC
  147. prompt "RTC clock source"
  148. default ESP32C3_RTC_CLK_SRC_INT_RC
  149. help
  150. Choose which clock is used as RTC clock source.
  151. config ESP32C3_RTC_CLK_SRC_INT_RC
  152. bool "Internal 150kHz RC oscillator"
  153. config ESP32C3_RTC_CLK_SRC_EXT_CRYS
  154. bool "External 32kHz crystal"
  155. select ESP_SYSTEM_RTC_EXT_XTAL
  156. config ESP32C3_RTC_CLK_SRC_EXT_OSC
  157. bool "External 32kHz oscillator at 32K_XP pin"
  158. config ESP32C3_RTC_CLK_SRC_INT_8MD256
  159. bool "Internal 8MHz oscillator, divided by 256 (~32kHz)"
  160. endchoice
  161. config ESP32C3_RTC_CLK_CAL_CYCLES
  162. int "Number of cycles for RTC_SLOW_CLK calibration"
  163. default 3000 if ESP32C3_RTC_CLK_SRC_EXT_CRYS || ESP32C3_RTC_CLK_SRC_EXT_OSC || ESP32C3_RTC_CLK_SRC_INT_8MD256
  164. default 1024 if ESP32C3_RTC_CLK_SRC_INT_RC
  165. range 0 125000
  166. help
  167. When the startup code initializes RTC_SLOW_CLK, it can perform
  168. calibration by comparing the RTC_SLOW_CLK frequency with main XTAL
  169. frequency. This option sets the number of RTC_SLOW_CLK cycles measured
  170. by the calibration routine. Higher numbers increase calibration
  171. precision, which may be important for applications which spend a lot of
  172. time in deep sleep. Lower numbers reduce startup time.
  173. When this option is set to 0, clock calibration will not be performed at
  174. startup, and approximate clock frequencies will be assumed:
  175. - 150000 Hz if internal RC oscillator is used as clock source. For this use value 1024.
  176. - 32768 Hz if the 32k crystal oscillator is used. For this use value 3000 or more.
  177. In case more value will help improve the definition of the launch of the crystal.
  178. If the crystal could not start, it will be switched to internal RC.
  179. config ESP32C3_NO_BLOBS
  180. bool "No Binary Blobs"
  181. depends on !BT_ENABLED
  182. default n
  183. help
  184. If enabled, this disables the linking of binary libraries in the application build. Note
  185. that after enabling this Wi-Fi/Bluetooth will not work.
  186. config ESP32C3_ALLOW_RTC_FAST_MEM_AS_HEAP
  187. bool "Enable RTC fast memory for dynamic allocations"
  188. depends on !ESP32C3_MEMPROT_FEATURE
  189. default y
  190. help
  191. This config option allows to add RTC fast memory region to system heap with capability
  192. similar to that of DRAM region but without DMA. This memory will be consumed first per
  193. heap initialization order by early startup services and scheduler related code. Speed
  194. wise RTC fast memory operates on APB clock and hence does not have much performance impact.
  195. endmenu # ESP32C3-Specific