power_management_esp32.rst 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ESP32 Power Management Algorithm
  2. --------------------------------
  3. The table below shows how CPU and APB frequencies will be switched if dynamic frequency scaling is enabled. You can specify the maximum CPU frequency with either :cpp:func:`esp_pm_configure` or :ref:`CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ`.
  4. +---------------+---------------------------------------+-------------------------------------+
  5. | Max CPU | Lock Acquisition | CPU and APB Frequncies |
  6. | Frequency Set | | |
  7. +---------------+---------------------------------------+-------------------------------------+
  8. | 240 | | Any of ``ESP_PM_CPU_FREQ_MAX`` | |
  9. | | | or ``ESP_PM_APB_FREQ_MAX`` acquired | | CPU: 240 MHz |
  10. | | | | APB: 80 MHz |
  11. + +---------------------------------------+-------------------------------------+
  12. | | None | Min values for both frequencies set |
  13. | | | with :cpp:func:`esp_pm_configure` |
  14. +---------------+---------------------------------------+-------------------------------------+
  15. | 160 | ``ESP_PM_CPU_FREQ_MAX`` acquired | | CPU: 160 MHz |
  16. | | | | APB: 80 MHz |
  17. + +---------------------------------------+-------------------------------------+
  18. | | ``ESP_PM_CPU_FREQ_MAX`` acquired, | | CPU: 80 MHz |
  19. | | ``ESP_PM_APB_FREQ_MAX`` not acquired | | APB: 80 MHz |
  20. + +---------------------------------------+-------------------------------------+
  21. | | None | Min values for both frequencies set |
  22. | | | with :cpp:func:`esp_pm_configure` |
  23. +---------------+---------------------------------------+-------------------------------------+
  24. | 80 | | Any of ``ESP_PM_CPU_FREQ_MAX`` | | CPU: 80 MHz |
  25. | | | or ``ESP_PM_APB_FREQ_MAX`` acquired | | APB: 80 MHz |
  26. + +---------------------------------------+-------------------------------------+
  27. | | None | Min values for both frequencies set |
  28. | | | with :cpp:func:`esp_pm_configure` |
  29. +---------------+---------------------------------------+-------------------------------------+
  30. If none of the locks are acquired, and light sleep is enabled in a call to :cpp:func:`esp_pm_configure`, the system will go into light sleep mode. The duration of light sleep will be determined by:
  31. - FreeRTOS tasks blocked with finite timeouts
  32. - Timers registered with :doc:`High resolution timer <esp_timer>` APIs
  33. Light sleep duration will be chosen to wake up the chip before the nearest event (task being unblocked, or timer elapses).