Kconfig 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. menu "Power Management"
  2. config PM_ENABLE
  3. bool "Support for power management"
  4. # SMP FreeRTOS currently does not support power management IDF-4997
  5. # ESP32H2 currently does not support power management IDF-6270
  6. # Note. Disabling this option for H2 will also cause all sdkconfig.release test cases run without pm enabled
  7. # ORed with __DOXYGEN__ to pass H2 docs build, need to remove when pm is supported on H2
  8. depends on (!FREERTOS_SMP && !IDF_TARGET_ESP32H2) || __DOXYGEN__
  9. default n
  10. help
  11. If enabled, application is compiled with support for power management.
  12. This option has run-time overhead (increased interrupt latency,
  13. longer time to enter idle state), and it also reduces accuracy of
  14. RTOS ticks and timers used for timekeeping.
  15. Enable this option if application uses power management APIs.
  16. config PM_DFS_INIT_AUTO
  17. bool "Enable dynamic frequency scaling (DFS) at startup"
  18. depends on PM_ENABLE
  19. default n
  20. help
  21. If enabled, startup code configures dynamic frequency scaling.
  22. Max CPU frequency is set to DEFAULT_CPU_FREQ_MHZ setting,
  23. min frequency is set to XTAL frequency.
  24. If disabled, DFS will not be active until the application
  25. configures it using esp_pm_configure function.
  26. config PM_PROFILING
  27. bool "Enable profiling counters for PM locks"
  28. depends on PM_ENABLE
  29. default n
  30. help
  31. If enabled, esp_pm_* functions will keep track of the amount of time
  32. each of the power management locks has been held, and esp_pm_dump_locks
  33. function will print this information.
  34. This feature can be used to analyze which locks are preventing the chip
  35. from going into a lower power state, and see what time the chip spends
  36. in each power saving mode. This feature does incur some run-time
  37. overhead, so should typically be disabled in production builds.
  38. config PM_TRACE
  39. bool "Enable debug tracing of PM using GPIOs"
  40. depends on PM_ENABLE
  41. default n
  42. help
  43. If enabled, some GPIOs will be used to signal events such as RTOS ticks,
  44. frequency switching, entry/exit from idle state. Refer to pm_trace.c
  45. file for the list of GPIOs.
  46. This feature is intended to be used when analyzing/debugging behavior
  47. of power management implementation, and should be kept disabled in
  48. applications.
  49. config PM_SLP_IRAM_OPT
  50. bool "Put lightsleep related codes in internal RAM"
  51. depends on FREERTOS_USE_TICKLESS_IDLE
  52. help
  53. If enabled, about 1.8KB of lightsleep related source code would be in IRAM and chip would sleep
  54. longer for 760us at most each time.
  55. This feature is intended to be used when lower power consumption is needed
  56. while there is enough place in IRAM to place source code.
  57. config PM_RTOS_IDLE_OPT
  58. bool "Put RTOS IDLE related codes in internal RAM"
  59. depends on FREERTOS_USE_TICKLESS_IDLE
  60. help
  61. If enabled, about 260B of RTOS_IDLE related source code would be in IRAM and chip would sleep
  62. longer for 40us at most each time.
  63. This feature is intended to be used when lower power consumption is needed
  64. while there is enough place in IRAM to place source code.
  65. config PM_SLP_DISABLE_GPIO
  66. bool "Disable all GPIO when chip at sleep"
  67. depends on FREERTOS_USE_TICKLESS_IDLE
  68. help
  69. This feature is intended to disable all GPIO pins at automantic sleep to get a lower power mode.
  70. If enabled, chips will disable all GPIO pins at automantic sleep to reduce about 200~300 uA current.
  71. If you want to specifically use some pins normally as chip wakes when chip sleeps,
  72. you can call 'gpio_sleep_sel_dis' to disable this feature on those pins.
  73. You can also keep this feature on and call 'gpio_sleep_set_direction' and 'gpio_sleep_set_pull_mode'
  74. to have a different GPIO configuration at sleep.
  75. Waring: If you want to enable this option on ESP32, you should enable `GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL`
  76. at first, otherwise you will not be able to switch pullup/pulldown mode.
  77. config PM_SLP_DEFAULT_PARAMS_OPT
  78. bool
  79. default n
  80. config PM_CHECK_SLEEP_RETENTION_FRAME
  81. bool
  82. depends on PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
  83. default n if !IDF_CI_BUILD
  84. help
  85. This option is invisible to users, and it is only used for ci testing,
  86. enabling it in the application will increase the sleep and wake-up time overhead
  87. config PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
  88. bool "Power down CPU in light sleep"
  89. depends on IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C6
  90. select PM_POWER_DOWN_TAGMEM_IN_LIGHT_SLEEP if ESP32S3_DATA_CACHE_16KB
  91. default y
  92. help
  93. If enabled, the CPU will be powered down in light sleep. On esp32c3 soc, enabling this
  94. option will consume 1.68 KB of internal RAM and will reduce sleep current consumption
  95. by about 100 uA. On esp32s3 soc, enabling this option will consume 8.58 KB of internal
  96. RAM and will reduce sleep current consumption by about 650 uA.
  97. config PM_POWER_DOWN_TAGMEM_IN_LIGHT_SLEEP
  98. bool "Power down I/D-cache tag memory in light sleep"
  99. depends on IDF_TARGET_ESP32S3 && PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
  100. default y
  101. help
  102. If enabled, the I/D-cache tag memory will be retained in light sleep. Depending on the the
  103. cache configuration, if this option is enabled, it will consume up to 9 KB of internal RAM.
  104. config PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
  105. bool "Power down Digital Peripheral in light sleep (EXPERIMENTAL)"
  106. depends on SOC_PAU_SUPPORTED
  107. default n #TODO: enable by default if periph init/deinit management supported (WIFI-5252)
  108. help
  109. If enabled, digital peripherals will be powered down in light sleep, it will reduce sleep
  110. current consumption by about 100 uA. Chip will save/restore register context at sleep/wake
  111. time to keep the system running. Enabling this option will increase static RAM and heap usage,
  112. the actual cost depends on the peripherals you have initialized. In order to save/restore the
  113. context of the necessary hardware for FreeRTOS to run, it will need at least 4.55 KB free heap
  114. at sleep time. Otherwise sleep will not power down the peripherals.
  115. Note: Please use this option with caution, the current IDF does not support the retention of
  116. all peripherals. When the digital peripherals are powered off and a sleep and wake-up is completed,
  117. the peripherals that have not saved the running context are equivalent to performing a reset.
  118. !!! Please confirm the peripherals used in your application and their sleep retention support status
  119. before enabling this option, peripherals sleep retention driver support status is tracked in
  120. power_management.rst
  121. config PM_UPDATE_CCOMPARE_HLI_WORKAROUND
  122. bool
  123. default y if PM_ENABLE && BTDM_CTRL_HLI
  124. endmenu # "Power Management"