Kconfig 7.7 KB

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