Kconfig 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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_REV_MIN
  23. prompt "Minimum Supported ESP32-C3 Revision"
  24. default ESP32C3_REV_MIN_3
  25. help
  26. Minimum revision that ESP-IDF would support.
  27. Only supporting higher chip revisions can reduce binary size.
  28. config ESP32C3_REV_MIN_0
  29. bool "Rev 0"
  30. config ESP32C3_REV_MIN_1
  31. bool "Rev 1"
  32. config ESP32C3_REV_MIN_2
  33. bool "Rev 2"
  34. config ESP32C3_REV_MIN_3
  35. bool "Rev 3"
  36. endchoice
  37. config ESP32C3_REV_MIN
  38. int
  39. default 0 if ESP32C3_REV_MIN_0
  40. default 1 if ESP32C3_REV_MIN_1
  41. default 2 if ESP32C3_REV_MIN_2
  42. default 3 if ESP32C3_REV_MIN_3
  43. choice ESP32C3_UNIVERSAL_MAC_ADDRESSES
  44. bool "Number of universally administered (by IEEE) MAC address"
  45. default ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR
  46. help
  47. Configure the number of universally administered (by IEEE) MAC addresses.
  48. During initialization, MAC addresses for each network interface are generated or derived from a
  49. single base MAC address.
  50. If the number of universal MAC addresses is four, all four interfaces (WiFi station, WiFi softap,
  51. Bluetooth and Ethernet) receive a universally administered MAC address. These are generated
  52. sequentially by adding 0, 1, 2 and 3 (respectively) to the final octet of the base MAC address.
  53. If the number of universal MAC addresses is two, only two interfaces (WiFi station and Bluetooth)
  54. receive a universally administered MAC address. These are generated sequentially by adding 0
  55. and 1 (respectively) to the base MAC address. The remaining two interfaces (WiFi softap and Ethernet)
  56. receive local MAC addresses. These are derived from the universal WiFi station and Bluetooth MAC
  57. addresses, respectively.
  58. When using the default (Espressif-assigned) base MAC address, either setting can be used. When using
  59. a custom universal MAC address range, the correct setting will depend on the allocation of MAC
  60. addresses in this range (either 2 or 4 per device.)
  61. Note that ESP32-C3 has no integrated Ethernet MAC. Although it's possible to use the esp_read_mac()
  62. API to return a MAC for Ethernet, this can only be used with an external MAC peripheral.
  63. config ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
  64. bool "Two"
  65. select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
  66. select ESP_MAC_ADDR_UNIVERSE_BT
  67. config ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR
  68. bool "Four"
  69. select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
  70. select ESP_MAC_ADDR_UNIVERSE_WIFI_AP
  71. select ESP_MAC_ADDR_UNIVERSE_BT
  72. select ESP_MAC_ADDR_UNIVERSE_ETH
  73. endchoice
  74. config ESP32C3_UNIVERSAL_MAC_ADDRESSES
  75. int
  76. default 2 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO
  77. default 4 if ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR
  78. config ESP32C3_DEBUG_OCDAWARE
  79. bool "Make exception and panic handlers JTAG/OCD aware"
  80. default y
  81. select FREERTOS_DEBUG_OCDAWARE
  82. help
  83. The FreeRTOS panic and unhandled exception handers can detect a JTAG OCD debugger and
  84. instead of panicking, have the debugger stop on the offending instruction.
  85. config ESP32C3_DEBUG_STUBS_ENABLE
  86. bool "OpenOCD debug stubs"
  87. default COMPILER_OPTIMIZATION_LEVEL_DEBUG
  88. depends on !ESP32C3_TRAX
  89. help
  90. Debug stubs are used by OpenOCD to execute pre-compiled onboard code which does some useful debugging,
  91. e.g. GCOV data dump.
  92. config ESP32C3_BROWNOUT_DET
  93. bool "Hardware brownout detect & reset"
  94. default y
  95. help
  96. The ESP32-C3 has a built-in brownout detector which can detect if the voltage is lower than
  97. a specific value. If this happens, it will reset the chip in order to prevent unintended
  98. behaviour.
  99. choice ESP32C3_BROWNOUT_DET_LVL_SEL
  100. prompt "Brownout voltage level"
  101. depends on ESP32C3_BROWNOUT_DET
  102. default ESP32C3_BROWNOUT_DET_LVL_SEL_7
  103. help
  104. The brownout detector will reset the chip when the supply voltage is approximately
  105. below this level. Note that there may be some variation of brownout voltage level
  106. between each chip.
  107. #The voltage levels here are estimates, more work needs to be done to figure out the exact voltages
  108. #of the brownout threshold levels.
  109. config ESP32C3_BROWNOUT_DET_LVL_SEL_7
  110. bool "2.51V"
  111. config ESP32C3_BROWNOUT_DET_LVL_SEL_6
  112. bool "2.64V"
  113. config ESP32C3_BROWNOUT_DET_LVL_SEL_5
  114. bool "2.76V"
  115. config ESP32C3_BROWNOUT_DET_LVL_SEL_4
  116. bool "2.92V"
  117. config ESP32C3_BROWNOUT_DET_LVL_SEL_3
  118. bool "3.10V"
  119. config ESP32C3_BROWNOUT_DET_LVL_SEL_2
  120. bool "3.27V"
  121. endchoice
  122. config ESP32C3_BROWNOUT_DET_LVL
  123. int
  124. default 2 if ESP32C3_BROWNOUT_DET_LVL_SEL_2
  125. default 3 if ESP32C3_BROWNOUT_DET_LVL_SEL_3
  126. default 4 if ESP32C3_BROWNOUT_DET_LVL_SEL_4
  127. default 5 if ESP32C3_BROWNOUT_DET_LVL_SEL_5
  128. default 6 if ESP32C3_BROWNOUT_DET_LVL_SEL_6
  129. default 7 if ESP32C3_BROWNOUT_DET_LVL_SEL_7
  130. choice ESP32C3_TIME_SYSCALL
  131. prompt "Timers used for gettimeofday function"
  132. default ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER
  133. help
  134. This setting defines which hardware timers are used to
  135. implement 'gettimeofday' and 'time' functions in C library.
  136. - If both high-resolution (systimer) and RTC timers are used, timekeeping will
  137. continue in deep sleep. Time will be reported at 1 microsecond
  138. resolution. This is the default, and the recommended option.
  139. - If only high-resolution timer (systimer) is used, gettimeofday will
  140. provide time at microsecond resolution.
  141. Time will not be preserved when going into deep sleep mode.
  142. - If only RTC timer is used, timekeeping will continue in
  143. deep sleep, but time will be measured at 6.(6) microsecond
  144. resolution. Also the gettimeofday function itself may take
  145. longer to run.
  146. - If no timers are used, gettimeofday and time functions
  147. return -1 and set errno to ENOSYS.
  148. - When RTC is used for timekeeping, two RTC_STORE registers are
  149. used to keep time in deep sleep mode.
  150. config ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER
  151. bool "RTC and high-resolution timer"
  152. select ESP_TIME_FUNCS_USE_RTC_TIMER
  153. select ESP_TIME_FUNCS_USE_ESP_TIMER
  154. config ESP32C3_TIME_SYSCALL_USE_RTC
  155. bool "RTC"
  156. select ESP_TIME_FUNCS_USE_RTC_TIMER
  157. config ESP32C3_TIME_SYSCALL_USE_SYSTIMER
  158. bool "High-resolution timer"
  159. select ESP_TIME_FUNCS_USE_ESP_TIMER
  160. config ESP32C3_TIME_SYSCALL_USE_NONE
  161. bool "None"
  162. select ESP_TIME_FUNCS_USE_NONE
  163. endchoice
  164. choice ESP32C3_RTC_CLK_SRC
  165. prompt "RTC clock source"
  166. default ESP32C3_RTC_CLK_SRC_INT_RC
  167. help
  168. Choose which clock is used as RTC clock source.
  169. config ESP32C3_RTC_CLK_SRC_INT_RC
  170. bool "Internal 150kHz RC oscillator"
  171. config ESP32C3_RTC_CLK_SRC_EXT_CRYS
  172. bool "External 32kHz crystal"
  173. select ESP_SYSTEM_RTC_EXT_XTAL
  174. config ESP32C3_RTC_CLK_SRC_EXT_OSC
  175. bool "External 32kHz oscillator at 32K_XP pin"
  176. config ESP32C3_RTC_CLK_SRC_INT_8MD256
  177. bool "Internal 8MHz oscillator, divided by 256 (~32kHz)"
  178. endchoice
  179. config ESP32C3_RTC_CLK_CAL_CYCLES
  180. int "Number of cycles for RTC_SLOW_CLK calibration"
  181. default 3000 if ESP32C3_RTC_CLK_SRC_EXT_CRYS || ESP32C3_RTC_CLK_SRC_EXT_OSC || ESP32C3_RTC_CLK_SRC_INT_8MD256
  182. default 1024 if ESP32C3_RTC_CLK_SRC_INT_RC
  183. range 0 125000
  184. help
  185. When the startup code initializes RTC_SLOW_CLK, it can perform
  186. calibration by comparing the RTC_SLOW_CLK frequency with main XTAL
  187. frequency. This option sets the number of RTC_SLOW_CLK cycles measured
  188. by the calibration routine. Higher numbers increase calibration
  189. precision, which may be important for applications which spend a lot of
  190. time in deep sleep. Lower numbers reduce startup time.
  191. When this option is set to 0, clock calibration will not be performed at
  192. startup, and approximate clock frequencies will be assumed:
  193. - 150000 Hz if internal RC oscillator is used as clock source. For this use value 1024.
  194. - 32768 Hz if the 32k crystal oscillator is used. For this use value 3000 or more.
  195. In case more value will help improve the definition of the launch of the crystal.
  196. If the crystal could not start, it will be switched to internal RC.
  197. config ESP32C3_NO_BLOBS
  198. bool "No Binary Blobs"
  199. depends on !BT_ENABLED
  200. default n
  201. help
  202. If enabled, this disables the linking of binary libraries in the application build. Note
  203. that after enabling this Wi-Fi/Bluetooth will not work.
  204. config ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND
  205. bool "light sleep GPIO reset workaround"
  206. default y
  207. select PM_SLP_DISABLE_GPIO if FREERTOS_USE_TICKLESS_IDLE
  208. help
  209. ESP32C3 will reset at wake-up if GPIO is received a small electrostatic pulse during
  210. light sleep, with specific condition
  211. - GPIO needs to be configured as input-mode only
  212. - The pin receives a small electrostatic pulse, and reset occurs when the pulse
  213. voltage is higher than 6 V
  214. For GPIO set to input mode only, it is not a good practice to leave it open/floating,
  215. The hardware design needs to controlled it with determined supply or ground voltage
  216. is necessary.
  217. This option provides a software workaround for this issue. Configure to isolate all
  218. GPIO pins in sleep state.
  219. endmenu # ESP32C3-Specific