diff --git a/Documentation/platforms/risc-v/esp32p4/boards/esp32p4-function-ev-board/index.rst b/Documentation/platforms/risc-v/esp32p4/boards/esp32p4-function-ev-board/index.rst index 7202e309d2c..65cd8e10750 100644 --- a/Documentation/platforms/risc-v/esp32p4/boards/esp32p4-function-ev-board/index.rst +++ b/Documentation/platforms/risc-v/esp32p4/boards/esp32p4-function-ev-board/index.rst @@ -234,6 +234,63 @@ ostest Runs OS tests from ``apps/testing/ostest``. +pm +------- + +This config demonstrate the use of power management. +You can use the ``pmconfig`` command to check current power state and time spent in other power states. +Also you can define time will spend in standby and sleep modes:: + + $ make menuconfig + -> Board Selection + -> (15) PM_STANDBY delay (seconds) + (0) PM_STANDBY delay (nanoseconds) + (20) PM_SLEEP delay (seconds) + (0) PM_SLEEP delay (nanoseconds) + +Timer wakeup is not only way to wake up the chip. Other wakeup modes include: + +- EXT1 wakeup mode: Uses RTC GPIO pins to wake up the chip. Enabled with ``CONFIG_PM_EXT1_WAKEUP`` option. +- GPIO wakeup mode: Uses GPIO pins to wakeup the chip. Only wakes up the chip from ``PM_STANDBY`` mode and requires ``CONFIG_PM_GPIO_WAKEUP``. +- UART wakeup mode: Uses UART to wakeup the chip. Only wakes up the chip from ``PM_STANDBY`` mode and requires ``CONFIG_PM_GPIO_WAKEUP``. + +Before switching PM status, you need to query the current PM status to call correct number of relax command to correct modes:: + + nsh> pmconfig + Last state 0, Next state 0 + + /proc/pm/state0: + DOMAIN0 WAKE SLEEP TOTAL + normal 0s 00% 0s 00% 0s 00% + idle 0s 00% 0s 00% 0s 00% + standby 0s 00% 0s 00% 0s 00% + sleep 0s 00% 0s 00% 0s 00% + + /proc/pm/wakelock0: + DOMAIN0 STATE COUNT TIME + system normal 2 1s + system idle 1 1s + system standby 1 1s + system sleep 1 1s + +In this case, needed commands to switch the system into PM idle mode:: + + nsh> pmconfig relax normal + nsh> pmconfig relax normal + +In this case, needed commands to switch the system into PM standby mode:: + + nsh> pmconfig relax idle + nsh> pmconfig relax normal + nsh> pmconfig relax normal + +System switch to the PM sleep mode, you need to enter:: + + nsh> pmconfig relax standby + nsh> pmconfig relax idle + nsh> pmconfig relax normal + nsh> pmconfig relax normal + pwm ---