Kconfig 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. config ESP32C3_DEBUG_OCDAWARE
  44. bool "Make exception and panic handlers JTAG/OCD aware"
  45. default y
  46. select FREERTOS_DEBUG_OCDAWARE
  47. help
  48. The FreeRTOS panic and unhandled exception handers can detect a JTAG OCD debugger and
  49. instead of panicking, have the debugger stop on the offending instruction.
  50. config ESP32C3_DEBUG_STUBS_ENABLE
  51. bool "OpenOCD debug stubs"
  52. default COMPILER_OPTIMIZATION_LEVEL_DEBUG
  53. depends on !ESP32C3_TRAX
  54. help
  55. Debug stubs are used by OpenOCD to execute pre-compiled onboard code which does some useful debugging,
  56. e.g. GCOV data dump.
  57. config ESP32C3_BROWNOUT_DET
  58. bool "Hardware brownout detect & reset"
  59. depends on !IDF_ENV_FPGA
  60. default y
  61. help
  62. The ESP32-C3 has a built-in brownout detector which can detect if the voltage is lower than
  63. a specific value. If this happens, it will reset the chip in order to prevent unintended
  64. behaviour.
  65. choice ESP32C3_BROWNOUT_DET_LVL_SEL
  66. prompt "Brownout voltage level"
  67. depends on ESP32C3_BROWNOUT_DET
  68. default ESP32C3_BROWNOUT_DET_LVL_SEL_7
  69. help
  70. The brownout detector will reset the chip when the supply voltage is approximately
  71. below this level. Note that there may be some variation of brownout voltage level
  72. between each chip.
  73. #The voltage levels here are estimates, more work needs to be done to figure out the exact voltages
  74. #of the brownout threshold levels.
  75. config ESP32C3_BROWNOUT_DET_LVL_SEL_7
  76. bool "2.51V"
  77. config ESP32C3_BROWNOUT_DET_LVL_SEL_6
  78. bool "2.64V"
  79. config ESP32C3_BROWNOUT_DET_LVL_SEL_5
  80. bool "2.76V"
  81. config ESP32C3_BROWNOUT_DET_LVL_SEL_4
  82. bool "2.92V"
  83. config ESP32C3_BROWNOUT_DET_LVL_SEL_3
  84. bool "3.10V"
  85. config ESP32C3_BROWNOUT_DET_LVL_SEL_2
  86. bool "3.27V"
  87. endchoice
  88. config ESP32C3_BROWNOUT_DET_LVL
  89. int
  90. default 2 if ESP32C3_BROWNOUT_DET_LVL_SEL_2
  91. default 3 if ESP32C3_BROWNOUT_DET_LVL_SEL_3
  92. default 4 if ESP32C3_BROWNOUT_DET_LVL_SEL_4
  93. default 5 if ESP32C3_BROWNOUT_DET_LVL_SEL_5
  94. default 6 if ESP32C3_BROWNOUT_DET_LVL_SEL_6
  95. default 7 if ESP32C3_BROWNOUT_DET_LVL_SEL_7
  96. choice ESP32C3_TIME_SYSCALL
  97. prompt "Timers used for gettimeofday function"
  98. default ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER
  99. help
  100. This setting defines which hardware timers are used to
  101. implement 'gettimeofday' and 'time' functions in C library.
  102. - If both high-resolution (systimer) and RTC timers are used, timekeeping will
  103. continue in deep sleep. Time will be reported at 1 microsecond
  104. resolution. This is the default, and the recommended option.
  105. - If only high-resolution timer (systimer) is used, gettimeofday will
  106. provide time at microsecond resolution.
  107. Time will not be preserved when going into deep sleep mode.
  108. - If only RTC timer is used, timekeeping will continue in
  109. deep sleep, but time will be measured at 6.(6) microsecond
  110. resolution. Also the gettimeofday function itself may take
  111. longer to run.
  112. - If no timers are used, gettimeofday and time functions
  113. return -1 and set errno to ENOSYS.
  114. - When RTC is used for timekeeping, two RTC_STORE registers are
  115. used to keep time in deep sleep mode.
  116. config ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER
  117. bool "RTC and high-resolution timer"
  118. select ESP_TIME_FUNCS_USE_RTC_TIMER
  119. select ESP_TIME_FUNCS_USE_ESP_TIMER
  120. config ESP32C3_TIME_SYSCALL_USE_RTC
  121. bool "RTC"
  122. select ESP_TIME_FUNCS_USE_RTC_TIMER
  123. config ESP32C3_TIME_SYSCALL_USE_SYSTIMER
  124. bool "High-resolution timer"
  125. select ESP_TIME_FUNCS_USE_ESP_TIMER
  126. config ESP32C3_TIME_SYSCALL_USE_NONE
  127. bool "None"
  128. select ESP_TIME_FUNCS_USE_NONE
  129. endchoice
  130. choice ESP32C3_RTC_CLK_SRC
  131. prompt "RTC clock source"
  132. default ESP32C3_RTC_CLK_SRC_INT_RC
  133. help
  134. Choose which clock is used as RTC clock source.
  135. config ESP32C3_RTC_CLK_SRC_INT_RC
  136. bool "Internal 150kHz RC oscillator"
  137. config ESP32C3_RTC_CLK_SRC_EXT_CRYS
  138. bool "External 32kHz crystal"
  139. select ESP_SYSTEM_RTC_EXT_XTAL
  140. config ESP32C3_RTC_CLK_SRC_EXT_OSC
  141. bool "External 32kHz oscillator at 32K_XP pin"
  142. select ESP_SYSTEM_RTC_EXT_OSC
  143. config ESP32C3_RTC_CLK_SRC_INT_8MD256
  144. bool "Internal 8MHz oscillator, divided by 256 (~32kHz)"
  145. endchoice
  146. config ESP32C3_RTC_CLK_CAL_CYCLES
  147. int "Number of cycles for RTC_SLOW_CLK calibration"
  148. default 3000 if ESP32C3_RTC_CLK_SRC_EXT_CRYS || ESP32C3_RTC_CLK_SRC_EXT_OSC || ESP32C3_RTC_CLK_SRC_INT_8MD256
  149. default 1024 if ESP32C3_RTC_CLK_SRC_INT_RC
  150. range 0 27000 if ESP32C3_RTC_CLK_SRC_EXT_CRYS || ESP32C3_RTC_CLK_SRC_EXT_OSC || ESP32C3_RTC_CLK_SRC_INT_8MD256
  151. range 0 32766 if ESP32C3_RTC_CLK_SRC_INT_RC
  152. help
  153. When the startup code initializes RTC_SLOW_CLK, it can perform
  154. calibration by comparing the RTC_SLOW_CLK frequency with main XTAL
  155. frequency. This option sets the number of RTC_SLOW_CLK cycles measured
  156. by the calibration routine. Higher numbers increase calibration
  157. precision, which may be important for applications which spend a lot of
  158. time in deep sleep. Lower numbers reduce startup time.
  159. When this option is set to 0, clock calibration will not be performed at
  160. startup, and approximate clock frequencies will be assumed:
  161. - 150000 Hz if internal RC oscillator is used as clock source. For this use value 1024.
  162. - 32768 Hz if the 32k crystal oscillator is used. For this use value 3000 or more.
  163. In case more value will help improve the definition of the launch of the crystal.
  164. If the crystal could not start, it will be switched to internal RC.
  165. config ESP32C3_NO_BLOBS
  166. bool "No Binary Blobs"
  167. depends on !BT_ENABLED
  168. default n
  169. help
  170. If enabled, this disables the linking of binary libraries in the application build. Note
  171. that after enabling this Wi-Fi/Bluetooth will not work.
  172. endmenu # ESP32C3-Specific