Kconfig 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. menu "ESP32H2-Specific"
  2. visible if IDF_TARGET_ESP32H2
  3. choice ESP32H2_DEFAULT_CPU_FREQ_MHZ
  4. prompt "CPU frequency"
  5. default ESP32H2_DEFAULT_CPU_FREQ_64 if IDF_ENV_FPGA
  6. default ESP32H2_DEFAULT_CPU_FREQ_96 if !IDF_ENV_FPGA
  7. help
  8. CPU frequency to be set on application startup.
  9. config ESP32H2_DEFAULT_CPU_FREQ_16
  10. bool "16 MHz"
  11. depends on IDF_ENV_FPGA #ESP32H2-TODO: IDF-3786
  12. config ESP32H2_DEFAULT_CPU_FREQ_32
  13. bool "32 MHz"
  14. depends on IDF_ENV_FPGA #ESP32H2-TODO: IDF-3786
  15. config ESP32H2_DEFAULT_CPU_FREQ_64
  16. bool "64 MHz"
  17. depends on IDF_ENV_FPGA #ESP32H2-TODO: IDF-3786
  18. config ESP32H2_DEFAULT_CPU_FREQ_96
  19. bool "96 MHz"
  20. depends on !IDF_ENV_FPGA
  21. endchoice
  22. config ESP32H2_DEFAULT_CPU_FREQ_MHZ
  23. int
  24. default 16 if ESP32H2_DEFAULT_CPU_FREQ_16
  25. default 32 if ESP32H2_DEFAULT_CPU_FREQ_32
  26. default 64 if ESP32H2_DEFAULT_CPU_FREQ_64
  27. default 96 if ESP32H2_DEFAULT_CPU_FREQ_96
  28. choice ESP32H2_REV_MIN
  29. prompt "Minimum Supported ESP32-H2 Revision"
  30. default ESP32H2_REV_MIN_0
  31. help
  32. Minimum revision that ESP-IDF would support.
  33. Only supporting higher chip revisions can reduce binary size.
  34. config ESP32H2_REV_MIN_0
  35. bool "Rev 0"
  36. endchoice
  37. config ESP32H2_REV_MIN
  38. int
  39. default 0 if ESP32H2_REV_MIN_0
  40. config ESP32H2_DEBUG_OCDAWARE
  41. bool "Make exception and panic handlers JTAG/OCD aware"
  42. default y
  43. select FREERTOS_DEBUG_OCDAWARE
  44. help
  45. The FreeRTOS panic and unhandled exception handers can detect a JTAG OCD debugger and
  46. instead of panicking, have the debugger stop on the offending instruction.
  47. config ESP32H2_DEBUG_STUBS_ENABLE
  48. bool "OpenOCD debug stubs"
  49. default COMPILER_OPTIMIZATION_LEVEL_DEBUG
  50. depends on !ESP32H2_TRAX
  51. help
  52. Debug stubs are used by OpenOCD to execute pre-compiled onboard code which does some useful debugging,
  53. e.g. GCOV data dump.
  54. config ESP32H2_BROWNOUT_DET
  55. bool "Hardware brownout detect & reset"
  56. default y
  57. help
  58. The ESP32-C3 has a built-in brownout detector which can detect if the voltage is lower than
  59. a specific value. If this happens, it will reset the chip in order to prevent unintended
  60. behaviour.
  61. choice ESP32H2_BROWNOUT_DET_LVL_SEL
  62. prompt "Brownout voltage level"
  63. depends on ESP32H2_BROWNOUT_DET
  64. default ESP32H2_BROWNOUT_DET_LVL_SEL_7
  65. help
  66. The brownout detector will reset the chip when the supply voltage is approximately
  67. below this level. Note that there may be some variation of brownout voltage level
  68. between each chip.
  69. #The voltage levels here are estimates, more work needs to be done to figure out the exact voltages
  70. #of the brownout threshold levels.
  71. config ESP32H2_BROWNOUT_DET_LVL_SEL_7
  72. bool "2.51V"
  73. config ESP32H2_BROWNOUT_DET_LVL_SEL_6
  74. bool "2.64V"
  75. config ESP32H2_BROWNOUT_DET_LVL_SEL_5
  76. bool "2.76V"
  77. config ESP32H2_BROWNOUT_DET_LVL_SEL_4
  78. bool "2.92V"
  79. config ESP32H2_BROWNOUT_DET_LVL_SEL_3
  80. bool "3.10V"
  81. config ESP32H2_BROWNOUT_DET_LVL_SEL_2
  82. bool "3.27V"
  83. endchoice
  84. config ESP32H2_BROWNOUT_DET_LVL
  85. int
  86. default 2 if ESP32H2_BROWNOUT_DET_LVL_SEL_2
  87. default 3 if ESP32H2_BROWNOUT_DET_LVL_SEL_3
  88. default 4 if ESP32H2_BROWNOUT_DET_LVL_SEL_4
  89. default 5 if ESP32H2_BROWNOUT_DET_LVL_SEL_5
  90. default 6 if ESP32H2_BROWNOUT_DET_LVL_SEL_6
  91. default 7 if ESP32H2_BROWNOUT_DET_LVL_SEL_7
  92. choice ESP32H2_TIME_SYSCALL
  93. prompt "Timers used for gettimeofday function"
  94. default ESP32H2_TIME_SYSCALL_USE_RTC_SYSTIMER
  95. help
  96. This setting defines which hardware timers are used to
  97. implement 'gettimeofday' and 'time' functions in C library.
  98. - If both high-resolution (systimer) and RTC timers are used, timekeeping will
  99. continue in deep sleep. Time will be reported at 1 microsecond
  100. resolution. This is the default, and the recommended option.
  101. - If only high-resolution timer (systimer) is used, gettimeofday will
  102. provide time at microsecond resolution.
  103. Time will not be preserved when going into deep sleep mode.
  104. - If only RTC timer is used, timekeeping will continue in
  105. deep sleep, but time will be measured at 6.(6) microsecond
  106. resolution. Also the gettimeofday function itself may take
  107. longer to run.
  108. - If no timers are used, gettimeofday and time functions
  109. return -1 and set errno to ENOSYS.
  110. - When RTC is used for timekeeping, two RTC_STORE registers are
  111. used to keep time in deep sleep mode.
  112. config ESP32H2_TIME_SYSCALL_USE_RTC_SYSTIMER
  113. bool "RTC and high-resolution timer"
  114. select ESP_TIME_FUNCS_USE_RTC_TIMER
  115. select ESP_TIME_FUNCS_USE_ESP_TIMER
  116. config ESP32H2_TIME_SYSCALL_USE_RTC
  117. bool "RTC"
  118. select ESP_TIME_FUNCS_USE_RTC_TIMER
  119. config ESP32H2_TIME_SYSCALL_USE_SYSTIMER
  120. bool "High-resolution timer"
  121. select ESP_TIME_FUNCS_USE_ESP_TIMER
  122. config ESP32H2_TIME_SYSCALL_USE_NONE
  123. bool "None"
  124. select ESP_TIME_FUNCS_USE_NONE
  125. endchoice
  126. choice ESP32H2_RTC_CLK_SRC
  127. prompt "RTC clock source"
  128. default ESP32H2_RTC_CLK_SRC_INT_RC
  129. help
  130. Choose which clock is used as RTC clock source.
  131. config ESP32H2_RTC_CLK_SRC_INT_RC
  132. bool "Internal 150kHz RC oscillator"
  133. config ESP32H2_RTC_CLK_SRC_EXT_CRYS
  134. bool "External 32kHz crystal"
  135. select ESP_SYSTEM_RTC_EXT_XTAL
  136. config ESP32H2_RTC_CLK_SRC_EXT_OSC
  137. bool "External 32kHz oscillator at 32K_XP pin"
  138. select ESP_SYSTEM_RTC_EXT_OSC
  139. config ESP32H2_RTC_CLK_SRC_INT_8MD256
  140. bool "Internal 8MHz oscillator, divided by 256 (~32kHz)"
  141. endchoice
  142. config ESP32H2_RTC_CLK_CAL_CYCLES
  143. int "Number of cycles for RTC_SLOW_CLK calibration"
  144. default 3000 if ESP32H2_RTC_CLK_SRC_EXT_CRYS || ESP32H2_RTC_CLK_SRC_EXT_OSC || ESP32H2_RTC_CLK_SRC_INT_8MD256
  145. default 576 if ESP32H2_RTC_CLK_SRC_INT_RC
  146. range 0 125000
  147. help
  148. When the startup code initializes RTC_SLOW_CLK, it can perform
  149. calibration by comparing the RTC_SLOW_CLK frequency with main XTAL
  150. frequency. This option sets the number of RTC_SLOW_CLK cycles measured
  151. by the calibration routine. Higher numbers increase calibration
  152. precision, which may be important for applications which spend a lot of
  153. time in deep sleep. Lower numbers reduce startup time.
  154. When this option is set to 0, clock calibration will not be performed at
  155. startup, and approximate clock frequencies will be assumed:
  156. - 150000 Hz if internal RC oscillator is used as clock source. For this use value 1024.
  157. - 32768 Hz if the 32k crystal oscillator is used. For this use value 3000 or more.
  158. In case more value will help improve the definition of the launch of the crystal.
  159. If the crystal could not start, it will be switched to internal RC.
  160. config ESP32H2_NO_BLOBS
  161. bool "No Binary Blobs"
  162. depends on !BT_ENABLED
  163. default n
  164. help
  165. If enabled, this disables the linking of binary libraries in the application build. Note
  166. that after enabling this Wi-Fi/Bluetooth will not work.
  167. config ESP32H2_LIGHTSLEEP_GPIO_RESET_WORKAROUND
  168. bool "light sleep GPIO reset workaround"
  169. default y
  170. select PM_SLP_DISABLE_GPIO if FREERTOS_USE_TICKLESS_IDLE
  171. help
  172. ESP32H2 will reset at wake-up if GPIO is received a small electrostatic pulse during
  173. light sleep, with specific condition
  174. - GPIO needs to be configured as input-mode only
  175. - The pin receives a small electrostatic pulse, and reset occurs when the pulse
  176. voltage is higher than 6 V
  177. For GPIO set to input mode only, it is not a good practice to leave it open/floating,
  178. The hardware design needs to controlled it with determined supply or ground voltage
  179. is necessary.
  180. This option provides a software workaround for this issue. Configure to isolate all
  181. GPIO pins in sleep state.
  182. endmenu # ESP32H2-Specific