Kconfig 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. menu "ESP32S2-specific"
  2. # TODO: this component simply shouldn't be included
  3. # in the build at the CMake level, but this is currently
  4. # not working so we just hide all items here
  5. visible if IDF_TARGET_ESP32S2
  6. choice ESP32S2_DEFAULT_CPU_FREQ_MHZ
  7. prompt "CPU frequency"
  8. default ESP32S2_DEFAULT_CPU_FREQ_160 if !IDF_ENV_FPGA
  9. default ESP32S2_DEFAULT_CPU_FREQ_FPGA if IDF_ENV_FPGA
  10. help
  11. CPU frequency to be set on application startup.
  12. config ESP32S2_DEFAULT_CPU_FREQ_FPGA
  13. depends on IDF_ENV_FPGA
  14. bool "FPGA"
  15. config ESP32S2_DEFAULT_CPU_FREQ_80
  16. bool "80 MHz"
  17. config ESP32S2_DEFAULT_CPU_FREQ_160
  18. bool "160 MHz"
  19. config ESP32S2_DEFAULT_CPU_FREQ_240
  20. bool "240 MHz"
  21. endchoice
  22. config ESP32S2_DEFAULT_CPU_FREQ_MHZ
  23. int
  24. default 40 if IDF_ENV_FPGA
  25. default 80 if ESP32S2_DEFAULT_CPU_FREQ_80
  26. default 160 if ESP32S2_DEFAULT_CPU_FREQ_160
  27. default 240 if ESP32S2_DEFAULT_CPU_FREQ_240
  28. menu "Memory protection"
  29. config ESP32S2_MEMPROT_FEATURE
  30. bool "Enable memory protection"
  31. default "y"
  32. help
  33. If enabled, permission control module watches all memory access and fires panic handler
  34. if permission violation is detected. This feature automatically splits
  35. memory into data and instruction segments and sets Read/Execute permissions
  36. for instruction part (below splitting address) and Read/Write permissions
  37. for data part (above splitting address). The memory protection is effective
  38. on all access through IRAM0 and DRAM0 buses.
  39. config ESP32S2_MEMPROT_FEATURE_LOCK
  40. depends on ESP32S2_MEMPROT_FEATURE
  41. bool "Lock memory protection settings"
  42. default "y"
  43. help
  44. Once locked, memory protection settings cannot be changed anymore.
  45. The lock is reset only on the chip startup.
  46. endmenu # Memory protection
  47. menu "Cache config"
  48. choice ESP32S2_INSTRUCTION_CACHE_SIZE
  49. prompt "Instruction cache size"
  50. default ESP32S2_INSTRUCTION_CACHE_8KB
  51. help
  52. Instruction cache size to be set on application startup.
  53. If you use 8KB instruction cache rather than 16KB instruction cache,
  54. then the other 8KB will be added to the heap.
  55. config ESP32S2_INSTRUCTION_CACHE_8KB
  56. bool "8KB"
  57. config ESP32S2_INSTRUCTION_CACHE_16KB
  58. bool "16KB"
  59. endchoice
  60. choice ESP32S2_INSTRUCTION_CACHE_LINE_SIZE
  61. prompt "Instruction cache line size"
  62. default ESP32S2_INSTRUCTION_CACHE_LINE_32B
  63. help
  64. Instruction cache line size to be set on application startup.
  65. config ESP32S2_INSTRUCTION_CACHE_LINE_16B
  66. bool "16 Bytes"
  67. config ESP32S2_INSTRUCTION_CACHE_LINE_32B
  68. bool "32 Bytes"
  69. endchoice
  70. choice ESP32S2_DATA_CACHE_SIZE
  71. prompt "Data cache size"
  72. default ESP32S2_DATA_CACHE_8KB
  73. help
  74. Data cache size to be set on application startup.
  75. If you use 8KB data cache rather than 16KB data cache, the other 8KB will be added to the heap.
  76. config ESP32S2_DATA_CACHE_0KB
  77. depends on !ESP32S2_SPIRAM_SUPPORT
  78. bool "0KB"
  79. config ESP32S2_DATA_CACHE_8KB
  80. bool "8KB"
  81. config ESP32S2_DATA_CACHE_16KB
  82. bool "16KB"
  83. endchoice
  84. choice ESP32S2_DATA_CACHE_LINE_SIZE
  85. prompt "Data cache line size"
  86. default ESP32S2_DATA_CACHE_LINE_32B
  87. help
  88. Data cache line size to be set on application startup.
  89. config ESP32S2_DATA_CACHE_LINE_16B
  90. bool "16 Bytes"
  91. config ESP32S2_DATA_CACHE_LINE_32B
  92. bool "32 Bytes"
  93. endchoice
  94. config ESP32S2_INSTRUCTION_CACHE_WRAP
  95. bool "Enable instruction cache wrap"
  96. default "n"
  97. help
  98. If enabled, instruction cache will use wrap mode to read spi flash (maybe spiram).
  99. The wrap length equals to INSTRUCTION_CACHE_LINE_SIZE.
  100. However, it depends on complex conditions.
  101. config ESP32S2_DATA_CACHE_WRAP
  102. bool "Enable data cache wrap"
  103. default "n"
  104. help
  105. If enabled, data cache will use wrap mode to read spiram (maybe spi flash).
  106. The wrap length equals to DATA_CACHE_LINE_SIZE.
  107. However, it depends on complex conditions.
  108. endmenu # Cache config
  109. # Note: to support SPIRAM across multiple chips, check CONFIG_SPIRAM
  110. # instead
  111. config ESP32S2_SPIRAM_SUPPORT
  112. bool "Support for external, SPI-connected RAM"
  113. default "n"
  114. select SPIRAM
  115. help
  116. This enables support for an external SPI RAM chip, connected in parallel with the
  117. main SPI flash chip.
  118. menu "SPI RAM config"
  119. depends on ESP32S2_SPIRAM_SUPPORT
  120. choice SPIRAM_TYPE
  121. prompt "Type of SPI RAM chip in use"
  122. default SPIRAM_TYPE_AUTO
  123. config SPIRAM_TYPE_AUTO
  124. bool "Auto-detect"
  125. config SPIRAM_TYPE_ESPPSRAM16
  126. bool "ESP-PSRAM16 or APS1604"
  127. config SPIRAM_TYPE_ESPPSRAM32
  128. bool "ESP-PSRAM32 or IS25WP032"
  129. config SPIRAM_TYPE_ESPPSRAM64
  130. bool "ESP-PSRAM64 or LY68L6400"
  131. endchoice
  132. config SPIRAM_SIZE
  133. int
  134. default -1 if SPIRAM_TYPE_AUTO
  135. default 2097152 if SPIRAM_TYPE_ESPPSRAM16
  136. default 4194304 if SPIRAM_TYPE_ESPPSRAM32
  137. default 8388608 if SPIRAM_TYPE_ESPPSRAM64
  138. default 0
  139. menu "PSRAM clock and cs IO for ESP32S2"
  140. depends on ESP32S2_SPIRAM_SUPPORT
  141. config DEFAULT_PSRAM_CLK_IO
  142. int "PSRAM CLK IO number"
  143. range 0 33
  144. default 30
  145. help
  146. The PSRAM CLOCK IO can be any unused GPIO, user can config it based on hardware design.
  147. config DEFAULT_PSRAM_CS_IO
  148. int "PSRAM CS IO number"
  149. range 0 33
  150. default 26
  151. help
  152. The PSRAM CS IO can be any unused GPIO, user can config it based on hardware design.
  153. endmenu
  154. config SPIRAM_FETCH_INSTRUCTIONS
  155. bool "Cache fetch instructions from SPI RAM"
  156. default n
  157. help
  158. If enabled, instruction in flash will be copied into SPIRAM.
  159. If SPIRAM_RODATA also enabled,
  160. you can run the instruction when erasing or programming the flash.
  161. config SPIRAM_RODATA
  162. bool "Cache load read only data from SPI RAM"
  163. default n
  164. help
  165. If enabled, radata in flash will be copied into SPIRAM.
  166. If SPIRAM_FETCH_INSTRUCTIONS also enabled,
  167. you can run the instruction when erasing or programming the flash.
  168. config SPIRAM_USE_AHB_DBUS3
  169. bool "Enable AHB DBUS3 to access SPIRAM"
  170. default n
  171. help
  172. If Enabled, if SPI_CONFIG_SIZE is bigger then 10MB+576KB,
  173. then you can have 4MB more space to map the SPIRAM.
  174. However, the AHB bus is slower than other data cache buses.
  175. choice SPIRAM_SPEED
  176. prompt "Set RAM clock speed"
  177. default SPIRAM_SPEED_40M
  178. help
  179. Select the speed for the SPI RAM chip.
  180. If SPI RAM is enabled, we only support three combinations of SPI speed mode we supported now:
  181. 1. Flash SPI running at 40Mhz and RAM SPI running at 40Mhz
  182. 2. Flash SPI running at 80Mhz and RAM SPI running at 40Mhz
  183. 3. Flash SPI running at 80Mhz and RAM SPI running at 80Mhz
  184. Note: If the third mode(80Mhz+80Mhz) is enabled for SPI RAM of type 32MBit, one of the HSPI/VSPI host
  185. will be occupied by the system. Which SPI host to use can be selected by the config item
  186. SPIRAM_OCCUPY_SPI_HOST. Application code should never touch HSPI/VSPI hardware in this case. The
  187. option to select 80MHz will only be visible if the flash SPI speed is also 80MHz.
  188. (ESPTOOLPY_FLASHFREQ_80M is true)
  189. config SPIRAM_SPEED_80M
  190. bool "80MHz clock speed"
  191. config SPIRAM_SPEED_40M
  192. bool "40Mhz clock speed"
  193. config SPIRAM_SPEED_26M
  194. bool "26Mhz clock speed"
  195. config SPIRAM_SPEED_20M
  196. bool "20Mhz clock speed"
  197. endchoice
  198. # insert non-chip-specific items here
  199. source "$IDF_PATH/components/esp_common/Kconfig.spiram.common"
  200. endmenu
  201. config ESP32S2_MEMMAP_TRACEMEM
  202. bool
  203. default "n"
  204. config ESP32S2_MEMMAP_TRACEMEM_TWOBANKS
  205. bool
  206. default "n"
  207. config ESP32S2_TRAX
  208. bool "Use TRAX tracing feature"
  209. default "n"
  210. select ESP32S2_MEMMAP_TRACEMEM
  211. help
  212. The ESP32S2 contains a feature which allows you to trace the execution path the processor
  213. has taken through the program. This is stored in a chunk of 32K (16K for single-processor)
  214. of memory that can't be used for general purposes anymore. Disable this if you do not know
  215. what this is.
  216. config ESP32S2_TRACEMEM_RESERVE_DRAM
  217. hex
  218. default 0x8000 if ESP32S2_MEMMAP_TRACEMEM && ESP32S2_MEMMAP_TRACEMEM_TWOBANKS
  219. default 0x4000 if ESP32S2_MEMMAP_TRACEMEM && !ESP32S2_MEMMAP_TRACEMEM_TWOBANKS
  220. default 0x0
  221. choice ESP32S2_UNIVERSAL_MAC_ADDRESSES
  222. bool "Number of universally administered (by IEEE) MAC address"
  223. default ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO
  224. help
  225. Configure the number of universally administered (by IEEE) MAC addresses.
  226. During initialization, MAC addresses for each network interface are generated or derived from a
  227. single base MAC address.
  228. If the number of universal MAC addresses is Two, all interfaces (WiFi station, WiFi softap) receive a
  229. universally administered MAC address. They are generated sequentially by adding 0, and 1 (respectively)
  230. to the final octet of the base MAC address. If the number of universal MAC addresses is one,
  231. only WiFi station receives a universally administered MAC address.
  232. It's generated by adding 0 to the base MAC address.
  233. The WiFi softap receives local MAC addresses. It's derived from the universal WiFi station MAC addresses.
  234. When using the default (Espressif-assigned) base MAC address, either setting can be used. When using
  235. a custom universal MAC address range, the correct setting will depend on the allocation of MAC
  236. addresses in this range (either 1 or 2 per device.)
  237. config ESP32S2_UNIVERSAL_MAC_ADDRESSES_ONE
  238. bool "One"
  239. select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
  240. config ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO
  241. bool "Two"
  242. select ESP_MAC_ADDR_UNIVERSE_WIFI_STA
  243. select ESP_MAC_ADDR_UNIVERSE_WIFI_AP
  244. endchoice
  245. config ESP32S2_UNIVERSAL_MAC_ADDRESSES
  246. int
  247. default 1 if ESP32S2_UNIVERSAL_MAC_ADDRESSES_ONE
  248. default 2 if ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO
  249. config ESP32S2_ULP_COPROC_ENABLED
  250. bool "Enable Ultra Low Power (ULP) Coprocessor"
  251. default "n"
  252. help
  253. Set to 'y' if you plan to load a firmware for the coprocessor.
  254. If this option is enabled, further coprocessor configuration will appear in the Components menu.
  255. config ESP32S2_ULP_COPROC_RESERVE_MEM
  256. int
  257. prompt "RTC slow memory reserved for coprocessor" if ESP32S2_ULP_COPROC_ENABLED
  258. default 512 if ESP32S2_ULP_COPROC_ENABLED
  259. range 32 8192 if ESP32S2_ULP_COPROC_ENABLED
  260. default 0 if !ESP32S2_ULP_COPROC_ENABLED
  261. range 0 0 if !ESP32S2_ULP_COPROC_ENABLED
  262. help
  263. Bytes of memory to reserve for ULP coprocessor firmware & data.
  264. Data is reserved at the beginning of RTC slow memory.
  265. config ESP32S2_DEBUG_OCDAWARE
  266. bool "Make exception and panic handlers JTAG/OCD aware"
  267. default y
  268. select FREERTOS_DEBUG_OCDAWARE
  269. help
  270. The FreeRTOS panic and unhandled exception handers can detect a JTAG OCD debugger and
  271. instead of panicking, have the debugger stop on the offending instruction.
  272. config ESP32S2_DEBUG_STUBS_ENABLE
  273. bool "OpenOCD debug stubs"
  274. default COMPILER_OPTIMIZATION_LEVEL_DEBUG
  275. depends on !ESP32S2_TRAX
  276. help
  277. Debug stubs are used by OpenOCD to execute pre-compiled onboard code which does some useful debugging,
  278. e.g. GCOV data dump.
  279. config ESP32S2_BROWNOUT_DET
  280. bool "Hardware brownout detect & reset"
  281. default y
  282. help
  283. The ESP32-S2 has a built-in brownout detector which can detect if the voltage is lower than
  284. a specific value. If this happens, it will reset the chip in order to prevent unintended
  285. behaviour.
  286. choice ESP32S2_BROWNOUT_DET_LVL_SEL
  287. prompt "Brownout voltage level"
  288. depends on ESP32S2_BROWNOUT_DET
  289. default ESP32S2_BROWNOUT_DET_LVL_SEL_7
  290. help
  291. The brownout detector will reset the chip when the supply voltage is approximately
  292. below this level. Note that there may be some variation of brownout voltage level
  293. between each ESP3-S2 chip.
  294. #The voltage levels here are estimates, more work needs to be done to figure out the exact voltages
  295. #of the brownout threshold levels.
  296. config ESP32S2_BROWNOUT_DET_LVL_SEL_7
  297. bool "2.44V"
  298. config ESP32S2_BROWNOUT_DET_LVL_SEL_6
  299. bool "2.56V"
  300. config ESP32S2_BROWNOUT_DET_LVL_SEL_5
  301. bool "2.67V"
  302. config ESP32S2_BROWNOUT_DET_LVL_SEL_4
  303. bool "2.84V"
  304. config ESP32S2_BROWNOUT_DET_LVL_SEL_3
  305. bool "2.98V"
  306. config ESP32S2_BROWNOUT_DET_LVL_SEL_2
  307. bool "3.19V"
  308. config ESP32S2_BROWNOUT_DET_LVL_SEL_1
  309. bool "3.30V"
  310. endchoice
  311. config ESP32S2_BROWNOUT_DET_LVL
  312. int
  313. default 1 if ESP32S2_BROWNOUT_DET_LVL_SEL_1
  314. default 2 if ESP32S2_BROWNOUT_DET_LVL_SEL_2
  315. default 3 if ESP32S2_BROWNOUT_DET_LVL_SEL_3
  316. default 4 if ESP32S2_BROWNOUT_DET_LVL_SEL_4
  317. default 5 if ESP32S2_BROWNOUT_DET_LVL_SEL_5
  318. default 6 if ESP32S2_BROWNOUT_DET_LVL_SEL_6
  319. default 7 if ESP32S2_BROWNOUT_DET_LVL_SEL_7
  320. # Note about the use of "FRC1" name: currently FRC1 timer is not used for
  321. # high resolution timekeeping anymore. Instead the esp_timer API, implemented
  322. # using FRC2 timer, is used.
  323. # FRC1 name in the option name is kept for compatibility.
  324. choice ESP32S2_TIME_SYSCALL
  325. prompt "Timers used for gettimeofday function"
  326. default ESP32S2_TIME_SYSCALL_USE_RTC_FRC1
  327. help
  328. This setting defines which hardware timers are used to
  329. implement 'gettimeofday' and 'time' functions in C library.
  330. - If both high-resolution and RTC timers are used, timekeeping will
  331. continue in deep sleep. Time will be reported at 1 microsecond
  332. resolution. This is the default, and the recommended option.
  333. - If only high-resolution timer is used, gettimeofday will
  334. provide time at microsecond resolution.
  335. Time will not be preserved when going into deep sleep mode.
  336. - If only RTC timer is used, timekeeping will continue in
  337. deep sleep, but time will be measured at 6.(6) microsecond
  338. resolution. Also the gettimeofday function itself may take
  339. longer to run.
  340. - If no timers are used, gettimeofday and time functions
  341. return -1 and set errno to ENOSYS.
  342. - When RTC is used for timekeeping, two RTC_STORE registers are
  343. used to keep time in deep sleep mode.
  344. config ESP32S2_TIME_SYSCALL_USE_RTC_FRC1
  345. bool "RTC and high-resolution timer"
  346. config ESP32S2_TIME_SYSCALL_USE_RTC
  347. bool "RTC"
  348. config ESP32S2_TIME_SYSCALL_USE_FRC1
  349. bool "High-resolution timer"
  350. config ESP32S2_TIME_SYSCALL_USE_NONE
  351. bool "None"
  352. endchoice
  353. choice ESP32S2_RTC_CLK_SRC
  354. prompt "RTC clock source"
  355. default ESP32S2_RTC_CLK_SRC_INT_RC
  356. help
  357. Choose which clock is used as RTC clock source.
  358. - "Internal 90kHz oscillator" option provides lowest deep sleep current
  359. consumption, and does not require extra external components. However
  360. frequency stability with respect to temperature is poor, so time may
  361. drift in deep/light sleep modes.
  362. - "External 32kHz crystal" provides better frequency stability, at the
  363. expense of slightly higher (1uA) deep sleep current consumption.
  364. - "External 32kHz oscillator" allows using 32kHz clock generated by an
  365. external circuit. In this case, external clock signal must be connected
  366. to 32K_XN pin. Amplitude should be <1.2V in case of sine wave signal,
  367. and <1V in case of square wave signal. Common mode voltage should be
  368. 0.1 < Vcm < 0.5Vamp, where Vamp is the signal amplitude.
  369. Additionally, 1nF capacitor must be connected between 32K_XP pin and
  370. ground. 32K_XP pin can not be used as a GPIO in this case.
  371. - "Internal 8MHz oscillator divided by 256" option results in higher
  372. deep sleep current (by 5uA) but has better frequency stability than
  373. the internal 90kHz oscillator. It does not require external components.
  374. config ESP32S2_RTC_CLK_SRC_INT_RC
  375. bool "Internal 90kHz RC oscillator"
  376. config ESP32S2_RTC_CLK_SRC_EXT_CRYS
  377. bool "External 32kHz crystal"
  378. config ESP32S2_RTC_CLK_SRC_EXT_OSC
  379. bool "External 32kHz oscillator at 32K_XN pin"
  380. config ESP32S2_RTC_CLK_SRC_INT_8MD256
  381. bool "Internal 8MHz oscillator, divided by 256 (~32kHz)"
  382. endchoice
  383. config ESP32S2_RTC_CLK_CAL_CYCLES
  384. int "Number of cycles for RTC_SLOW_CLK calibration"
  385. default 3000 if ESP32S2_RTC_CLK_SRC_EXT_CRYS || ESP32S2_RTC_CLK_SRC_EXT_OSC || ESP32S2_RTC_CLK_SRC_INT_8MD256
  386. default 576 if ESP32S2_RTC_CLK_SRC_INT_RC
  387. range 0 125000
  388. help
  389. When the startup code initializes RTC_SLOW_CLK, it can perform
  390. calibration by comparing the RTC_SLOW_CLK frequency with main XTAL
  391. frequency. This option sets the number of RTC_SLOW_CLK cycles measured
  392. by the calibration routine. Higher numbers increase calibration
  393. precision, which may be important for applications which spend a lot of
  394. time in deep sleep. Lower numbers reduce startup time.
  395. When this option is set to 0, clock calibration will not be performed at
  396. startup, and approximate clock frequencies will be assumed:
  397. - 90000 Hz if internal RC oscillator is used as clock source. For this use value 1024.
  398. - 32768 Hz if the 32k crystal oscillator is used. For this use value 3000 or more.
  399. In case more value will help improve the definition of the launch of the crystal.
  400. If the crystal could not start, it will be switched to internal RC.
  401. config ESP32S2_RTC_XTAL_CAL_RETRY
  402. int "Number of attempts to repeat 32k XTAL calibration"
  403. default 3
  404. depends on ESP32S2_RTC_CLK_SRC_EXT_CRYS
  405. help
  406. Number of attempts to repeat 32k XTAL calibration
  407. before giving up and switching to the internal RC.
  408. Increase this option if the 32k crystal oscillator
  409. does not start and switches to internal RC.
  410. config ESP32S2_NO_BLOBS
  411. bool "No Binary Blobs"
  412. depends on !BT_ENABLED
  413. default n
  414. help
  415. If enabled, this disables the linking of binary libraries in the application build. Note
  416. that after enabling this Wi-Fi/Bluetooth will not work.
  417. config ESP32S2_RTCDATA_IN_FAST_MEM
  418. bool "Place RTC_DATA_ATTR and RTC_RODATA_ATTR variables into RTC fast memory segment"
  419. default n
  420. help
  421. This option allows to place .rtc_data and .rtc_rodata sections into
  422. RTC fast memory segment to free the slow memory region for ULP programs.
  423. config ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP
  424. bool "Enable RTC fast memory for dynamic allocations"
  425. depends on !ESP32S2_MEMPROT_FEATURE
  426. default y
  427. help
  428. This config option allows to add RTC fast memory region to system heap with capability
  429. similar to that of DRAM region but without DMA. This memory will be consumed first per
  430. heap initialization order by early startup services and scheduler related code. Speed
  431. wise RTC fast memory operates on APB clock and hence does not have much performance impact.
  432. endmenu # ESP32S2-Specific
  433. menu "Power Management"
  434. # TODO: this component simply shouldn't be included
  435. # in the build at the CMake level, but this is currently
  436. # not working so we just hide all items here
  437. visible if IDF_TARGET_ESP32S2
  438. config PM_ENABLE
  439. bool "Support for power management"
  440. default n
  441. help
  442. If enabled, application is compiled with support for power management.
  443. This option has run-time overhead (increased interrupt latency,
  444. longer time to enter idle state), and it also reduces accuracy of
  445. RTOS ticks and timers used for timekeeping.
  446. Enable this option if application uses power management APIs.
  447. config PM_DFS_INIT_AUTO
  448. bool "Enable dynamic frequency scaling (DFS) at startup"
  449. depends on PM_ENABLE
  450. default n
  451. help
  452. If enabled, startup code configures dynamic frequency scaling.
  453. Max CPU frequency is set to CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ setting,
  454. min frequency is set to XTAL frequency.
  455. If disabled, DFS will not be active until the application
  456. configures it using esp_pm_configure function.
  457. config PM_USE_RTC_TIMER_REF
  458. bool "Use RTC timer to prevent time drift (EXPERIMENTAL)"
  459. depends on PM_ENABLE && (ESP32S2_TIME_SYSCALL_USE_RTC || ESP32S2_TIME_SYSCALL_USE_RTC_FRC1)
  460. default n
  461. help
  462. When APB clock frequency changes, high-resolution timer (esp_timer)
  463. scale and base value need to be adjusted. Each adjustment may cause
  464. small error, and over time such small errors may cause time drift.
  465. If this option is enabled, RTC timer will be used as a reference to
  466. compensate for the drift.
  467. It is recommended that this option is only used if 32k XTAL is selected
  468. as RTC clock source.
  469. config PM_PROFILING
  470. bool "Enable profiling counters for PM locks"
  471. depends on PM_ENABLE
  472. default n
  473. help
  474. If enabled, esp_pm_* functions will keep track of the amount of time
  475. each of the power management locks has been held, and esp_pm_dump_locks
  476. function will print this information.
  477. This feature can be used to analyze which locks are preventing the chip
  478. from going into a lower power state, and see what time the chip spends
  479. in each power saving mode. This feature does incur some run-time
  480. overhead, so should typically be disabled in production builds.
  481. config PM_TRACE
  482. bool "Enable debug tracing of PM using GPIOs"
  483. depends on PM_ENABLE
  484. default n
  485. help
  486. If enabled, some GPIOs will be used to signal events such as RTOS ticks,
  487. frequency switching, entry/exit from idle state. Refer to pm_trace.c
  488. file for the list of GPIOs.
  489. This feature is intended to be used when analyzing/debugging behavior
  490. of power management implementation, and should be kept disabled in
  491. applications.
  492. endmenu # "Power Management"