Kconfig 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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_BROWNOUT_DET
  48. bool "Hardware brownout detect & reset"
  49. default y
  50. help
  51. The ESP32-C3 has a built-in brownout detector which can detect if the voltage is lower than
  52. a specific value. If this happens, it will reset the chip in order to prevent unintended
  53. behaviour.
  54. choice ESP32H2_BROWNOUT_DET_LVL_SEL
  55. prompt "Brownout voltage level"
  56. depends on ESP32H2_BROWNOUT_DET
  57. default ESP32H2_BROWNOUT_DET_LVL_SEL_7
  58. help
  59. The brownout detector will reset the chip when the supply voltage is approximately
  60. below this level. Note that there may be some variation of brownout voltage level
  61. between each chip.
  62. #The voltage levels here are estimates, more work needs to be done to figure out the exact voltages
  63. #of the brownout threshold levels.
  64. config ESP32H2_BROWNOUT_DET_LVL_SEL_7
  65. bool "2.51V"
  66. config ESP32H2_BROWNOUT_DET_LVL_SEL_6
  67. bool "2.64V"
  68. config ESP32H2_BROWNOUT_DET_LVL_SEL_5
  69. bool "2.76V"
  70. config ESP32H2_BROWNOUT_DET_LVL_SEL_4
  71. bool "2.92V"
  72. config ESP32H2_BROWNOUT_DET_LVL_SEL_3
  73. bool "3.10V"
  74. config ESP32H2_BROWNOUT_DET_LVL_SEL_2
  75. bool "3.27V"
  76. endchoice
  77. config ESP32H2_BROWNOUT_DET_LVL
  78. int
  79. default 2 if ESP32H2_BROWNOUT_DET_LVL_SEL_2
  80. default 3 if ESP32H2_BROWNOUT_DET_LVL_SEL_3
  81. default 4 if ESP32H2_BROWNOUT_DET_LVL_SEL_4
  82. default 5 if ESP32H2_BROWNOUT_DET_LVL_SEL_5
  83. default 6 if ESP32H2_BROWNOUT_DET_LVL_SEL_6
  84. default 7 if ESP32H2_BROWNOUT_DET_LVL_SEL_7
  85. choice ESP32H2_TIME_SYSCALL
  86. prompt "Timers used for gettimeofday function"
  87. default ESP32H2_TIME_SYSCALL_USE_RTC_SYSTIMER
  88. help
  89. This setting defines which hardware timers are used to
  90. implement 'gettimeofday' and 'time' functions in C library.
  91. - If both high-resolution (systimer) and RTC timers are used, timekeeping will
  92. continue in deep sleep. Time will be reported at 1 microsecond
  93. resolution. This is the default, and the recommended option.
  94. - If only high-resolution timer (systimer) is used, gettimeofday will
  95. provide time at microsecond resolution.
  96. Time will not be preserved when going into deep sleep mode.
  97. - If only RTC timer is used, timekeeping will continue in
  98. deep sleep, but time will be measured at 6.(6) microsecond
  99. resolution. Also the gettimeofday function itself may take
  100. longer to run.
  101. - If no timers are used, gettimeofday and time functions
  102. return -1 and set errno to ENOSYS.
  103. - When RTC is used for timekeeping, two RTC_STORE registers are
  104. used to keep time in deep sleep mode.
  105. config ESP32H2_TIME_SYSCALL_USE_RTC_SYSTIMER
  106. bool "RTC and high-resolution timer"
  107. select ESP_TIME_FUNCS_USE_RTC_TIMER
  108. select ESP_TIME_FUNCS_USE_ESP_TIMER
  109. config ESP32H2_TIME_SYSCALL_USE_RTC
  110. bool "RTC"
  111. select ESP_TIME_FUNCS_USE_RTC_TIMER
  112. config ESP32H2_TIME_SYSCALL_USE_SYSTIMER
  113. bool "High-resolution timer"
  114. select ESP_TIME_FUNCS_USE_ESP_TIMER
  115. config ESP32H2_TIME_SYSCALL_USE_NONE
  116. bool "None"
  117. select ESP_TIME_FUNCS_USE_NONE
  118. endchoice
  119. choice ESP32H2_RTC_CLK_SRC
  120. prompt "RTC clock source"
  121. default ESP32H2_RTC_CLK_SRC_INT_RC
  122. help
  123. Choose which clock is used as RTC clock source.
  124. config ESP32H2_RTC_CLK_SRC_INT_RC
  125. bool "Internal 150kHz RC oscillator"
  126. config ESP32H2_RTC_CLK_SRC_EXT_CRYS
  127. bool "External 32kHz crystal"
  128. select ESP_SYSTEM_RTC_EXT_XTAL
  129. config ESP32H2_RTC_CLK_SRC_EXT_OSC
  130. bool "External 32kHz oscillator at 32K_XP pin"
  131. select ESP_SYSTEM_RTC_EXT_OSC
  132. config ESP32H2_RTC_CLK_SRC_INT_8MD256
  133. bool "Internal 8MHz oscillator, divided by 256 (~32kHz)"
  134. endchoice
  135. config ESP32H2_RTC_CLK_CAL_CYCLES
  136. int "Number of cycles for RTC_SLOW_CLK calibration"
  137. default 3000 if ESP32H2_RTC_CLK_SRC_EXT_CRYS || ESP32H2_RTC_CLK_SRC_EXT_OSC || ESP32H2_RTC_CLK_SRC_INT_8MD256
  138. default 576 if ESP32H2_RTC_CLK_SRC_INT_RC
  139. range 0 125000
  140. help
  141. When the startup code initializes RTC_SLOW_CLK, it can perform
  142. calibration by comparing the RTC_SLOW_CLK frequency with main XTAL
  143. frequency. This option sets the number of RTC_SLOW_CLK cycles measured
  144. by the calibration routine. Higher numbers increase calibration
  145. precision, which may be important for applications which spend a lot of
  146. time in deep sleep. Lower numbers reduce startup time.
  147. When this option is set to 0, clock calibration will not be performed at
  148. startup, and approximate clock frequencies will be assumed:
  149. - 150000 Hz if internal RC oscillator is used as clock source. For this use value 1024.
  150. - 32768 Hz if the 32k crystal oscillator is used. For this use value 3000 or more.
  151. In case more value will help improve the definition of the launch of the crystal.
  152. If the crystal could not start, it will be switched to internal RC.
  153. config ESP32H2_NO_BLOBS
  154. bool "No Binary Blobs"
  155. depends on !BT_ENABLED
  156. default n
  157. help
  158. If enabled, this disables the linking of binary libraries in the application build. Note
  159. that after enabling this Wi-Fi/Bluetooth will not work.
  160. config ESP32H2_LIGHTSLEEP_GPIO_RESET_WORKAROUND
  161. bool "light sleep GPIO reset workaround"
  162. default y
  163. select PM_SLP_DISABLE_GPIO if FREERTOS_USE_TICKLESS_IDLE
  164. help
  165. ESP32H2 will reset at wake-up if GPIO is received a small electrostatic pulse during
  166. light sleep, with specific condition
  167. - GPIO needs to be configured as input-mode only
  168. - The pin receives a small electrostatic pulse, and reset occurs when the pulse
  169. voltage is higher than 6 V
  170. For GPIO set to input mode only, it is not a good practice to leave it open/floating,
  171. The hardware design needs to controlled it with determined supply or ground voltage
  172. is necessary.
  173. This option provides a software workaround for this issue. Configure to isolate all
  174. GPIO pins in sleep state.
  175. endmenu # ESP32H2-Specific