Kconfig 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. menu "ESP8684-Specific"
  2. visible if IDF_TARGET_ESP8684
  3. choice ESP8684_DEFAULT_CPU_FREQ_MHZ
  4. prompt "CPU frequency"
  5. default ESP8684_DEFAULT_CPU_FREQ_40 if IDF_ENV_FPGA
  6. default ESP8684_DEFAULT_CPU_FREQ_120 if !IDF_ENV_FPGA
  7. help
  8. CPU frequency to be set on application startup.
  9. config ESP8684_DEFAULT_CPU_FREQ_40
  10. bool "40 MHz"
  11. depends on IDF_ENV_FPGA
  12. config ESP8684_DEFAULT_CPU_FREQ_80
  13. bool "80 MHz"
  14. config ESP8684_DEFAULT_CPU_FREQ_120
  15. bool "120 MHz"
  16. endchoice
  17. config ESP8684_DEFAULT_CPU_FREQ_MHZ
  18. int
  19. default 40 if ESP8684_DEFAULT_CPU_FREQ_40
  20. default 80 if ESP8684_DEFAULT_CPU_FREQ_80
  21. default 120 if ESP8684_DEFAULT_CPU_FREQ_120
  22. menu "Cache config"
  23. choice ESP8684_MMU_PAGE_SIZE
  24. # TODO: IDF-3821
  25. prompt "Cache page size"
  26. default ESP8684_MMU_PAGE_SIZE_64KB
  27. help
  28. Cache page size to be set on application startup
  29. config ESP8684_MMU_PAGE_SIZE_16KB
  30. bool "16KB"
  31. config ESP8684_MMU_PAGE_SIZE_32KB
  32. bool "32KB"
  33. config ESP8684_MMU_PAGE_SIZE_64KB
  34. bool "64KB"
  35. endchoice
  36. config ESP8684_INSTRUCTION_CACHE_WRAP
  37. bool
  38. prompt "Instruction cache wrap"
  39. help
  40. If enabled, instruction cache will use wrap mode to read spi flash.
  41. The wrap length is fixed to 32B
  42. config ESP8684_MMU_PAGE_MODE
  43. int
  44. default 0 if ESP8684_MMU_PAGE_SIZE_16KB
  45. default 1 if ESP8684_MMU_PAGE_SIZE_32KB
  46. default 2 if ESP8684_MMU_PAGE_SIZE_64KB
  47. endmenu
  48. config ESP8684_DEBUG_OCDAWARE
  49. bool "Make exception and panic handlers JTAG/OCD aware"
  50. default y
  51. select FREERTOS_DEBUG_OCDAWARE
  52. help
  53. The FreeRTOS panic and unhandled exception handers can detect a JTAG OCD debugger and
  54. instead of panicking, have the debugger stop on the offending instruction.
  55. config ESP8684_DEBUG_STUBS_ENABLE
  56. bool "OpenOCD debug stubs"
  57. default COMPILER_OPTIMIZATION_LEVEL_DEBUG
  58. depends on !ESP8684_TRAX
  59. help
  60. Debug stubs are used by OpenOCD to execute pre-compiled onboard code which does some useful debugging,
  61. e.g. GCOV data dump.
  62. config ESP8684_BROWNOUT_DET
  63. bool "Hardware brownout detect & reset"
  64. default y
  65. help
  66. The ESP8684 has a built-in brownout detector which can detect if the voltage is lower than
  67. a specific value. If this happens, it will reset the chip in order to prevent unintended
  68. behaviour.
  69. choice ESP8684_BROWNOUT_DET_LVL_SEL
  70. prompt "Brownout voltage level"
  71. depends on ESP8684_BROWNOUT_DET
  72. default ESP8684_BROWNOUT_DET_LVL_SEL_7
  73. help
  74. The brownout detector will reset the chip when the supply voltage is approximately
  75. below this level. Note that there may be some variation of brownout voltage level
  76. between each chip.
  77. #The voltage levels here are estimates, more work needs to be done to figure out the exact voltages
  78. #of the brownout threshold levels.
  79. config ESP8684_BROWNOUT_DET_LVL_SEL_7
  80. bool "2.51V"
  81. config ESP8684_BROWNOUT_DET_LVL_SEL_6
  82. bool "2.64V"
  83. config ESP8684_BROWNOUT_DET_LVL_SEL_5
  84. bool "2.76V"
  85. config ESP8684_BROWNOUT_DET_LVL_SEL_4
  86. bool "2.92V"
  87. config ESP8684_BROWNOUT_DET_LVL_SEL_3
  88. bool "3.10V"
  89. config ESP8684_BROWNOUT_DET_LVL_SEL_2
  90. bool "3.27V"
  91. endchoice
  92. config ESP8684_BROWNOUT_DET_LVL
  93. int
  94. default 2 if ESP8684_BROWNOUT_DET_LVL_SEL_2
  95. default 3 if ESP8684_BROWNOUT_DET_LVL_SEL_3
  96. default 4 if ESP8684_BROWNOUT_DET_LVL_SEL_4
  97. default 5 if ESP8684_BROWNOUT_DET_LVL_SEL_5
  98. default 6 if ESP8684_BROWNOUT_DET_LVL_SEL_6
  99. default 7 if ESP8684_BROWNOUT_DET_LVL_SEL_7
  100. choice ESP8684_TIME_SYSCALL
  101. prompt "Timers used for gettimeofday function"
  102. default ESP8684_TIME_SYSCALL_USE_RTC_SYSTIMER
  103. help
  104. This setting defines which hardware timers are used to
  105. implement 'gettimeofday' and 'time' functions in C library.
  106. - If both high-resolution (systimer) and RTC timers are used, timekeeping will
  107. continue in deep sleep. Time will be reported at 1 microsecond
  108. resolution. This is the default, and the recommended option.
  109. - If only high-resolution timer (systimer) is used, gettimeofday will
  110. provide time at microsecond resolution.
  111. Time will not be preserved when going into deep sleep mode.
  112. - If only RTC timer is used, timekeeping will continue in
  113. deep sleep, but time will be measured at 6.(6) microsecond
  114. resolution. Also the gettimeofday function itself may take
  115. longer to run.
  116. - If no timers are used, gettimeofday and time functions
  117. return -1 and set errno to ENOSYS.
  118. - When RTC is used for timekeeping, two RTC_STORE registers are
  119. used to keep time in deep sleep mode.
  120. config ESP8684_TIME_SYSCALL_USE_RTC_SYSTIMER
  121. bool "RTC and high-resolution timer"
  122. select ESP_TIME_FUNCS_USE_RTC_TIMER
  123. select ESP_TIME_FUNCS_USE_ESP_TIMER
  124. config ESP8684_TIME_SYSCALL_USE_RTC
  125. bool "RTC"
  126. select ESP_TIME_FUNCS_USE_RTC_TIMER
  127. config ESP8684_TIME_SYSCALL_USE_SYSTIMER
  128. bool "High-resolution timer"
  129. select ESP_TIME_FUNCS_USE_ESP_TIMER
  130. config ESP8684_TIME_SYSCALL_USE_NONE
  131. bool "None"
  132. select ESP_TIME_FUNCS_USE_NONE
  133. endchoice
  134. choice ESP8684_RTC_CLK_SRC
  135. prompt "RTC clock source"
  136. default ESP8684_RTC_CLK_SRC_INT_RC
  137. help
  138. Choose which clock is used as RTC clock source.
  139. config ESP8684_RTC_CLK_SRC_INT_RC
  140. bool "Internal 150kHz RC oscillator"
  141. config ESP8684_RTC_CLK_SRC_EXT_OSC
  142. bool "External 32kHz oscillator at 32K_XP pin"
  143. config ESP8684_RTC_CLK_SRC_INT_8MD256
  144. bool "Internal 8MHz oscillator, divided by 256 (~32kHz)"
  145. endchoice
  146. config ESP8684_RTC_CLK_CAL_CYCLES
  147. int "Number of cycles for RTC_SLOW_CLK calibration"
  148. default 3000 if ESP8684_RTC_CLK_SRC_EXT_CRYS || ESP8684_RTC_CLK_SRC_EXT_OSC || ESP8684_RTC_CLK_SRC_INT_8MD256
  149. default 1024 if ESP8684_RTC_CLK_SRC_INT_RC
  150. range 0 27000 if ESP8684_RTC_CLK_SRC_EXT_CRYS || ESP8684_RTC_CLK_SRC_EXT_OSC || ESP8684_RTC_CLK_SRC_INT_8MD256
  151. range 0 32766 if ESP8684_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 ESP8684_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. config ESP8684_LIGHTSLEEP_GPIO_RESET_WORKAROUND # IDF-3904
  173. bool "light sleep GPIO reset workaround"
  174. default y
  175. select PM_SLP_DISABLE_GPIO if FREERTOS_USE_TICKLESS_IDLE
  176. help
  177. ESP8684 will reset at wake-up if GPIO is received a small electrostatic pulse during
  178. light sleep, with specific condition
  179. - GPIO needs to be configured as input-mode only
  180. - The pin receives a small electrostatic pulse, and reset occurs when the pulse
  181. voltage is higher than 6 V
  182. For GPIO set to input mode only, it is not a good practice to leave it open/floating,
  183. The hardware design needs to controlled it with determined supply or ground voltage
  184. is necessary.
  185. This option provides a software workaround for this issue. Configure to isolate all
  186. GPIO pins in sleep state.
  187. endmenu # ESP8684-Specific