This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit d2c6eced38649b2e18b33d8598d2c43abab5047c Author: Eren Terzioglu <[email protected]> AuthorDate: Thu Oct 23 17:47:08 2025 +0200 Documentation/risc-v/esp32[-c3|-c6|-h2]: Add PM docs Add PM doc support for esp32[-c3|-c6|-h2] Signed-off-by: Eren Terzioglu <[email protected]> --- .../esp32c3/boards/esp32c3-generic/index.rst | 51 +++++++++++++++++++++ .../esp32c6/boards/esp32c6-devkitc/index.rst | 53 ++++++++++++++++++++++ .../risc-v/esp32h2/boards/esp32h2-devkit/index.rst | 53 ++++++++++++++++++++++ 3 files changed, 157 insertions(+) diff --git a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst index 82de4ea42db..f4721e1132f 100644 --- a/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst +++ b/Documentation/platforms/risc-v/esp32c3/boards/esp32c3-generic/index.rst @@ -375,6 +375,57 @@ ostest This is the NuttX test at ``apps/testing/ostest`` that is run against all new architecture ports to assure a correct implementation of the OS. +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 mode:: + + $ make menuconfig + -> Board Selection + -> (15) PM_STANDBY delay (seconds) + (0) PM_STANDBY delay (nanoseconds) + +Timer wakeup is not only way to wake up the chip. Other wakeup modes include: + +- 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 + +Note: When normal mode COUNT is 0, it will switch to the next PM state where COUNT is not 0. + +Note: During light sleep, overall current consumption of board should drop from 18mA (without any system load) to 1 mA on ESP32-C3 DevkitM-1. + pwm --- diff --git a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst index 2860c2ab1a8..8e90ecdfb2b 100644 --- a/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst +++ b/Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst @@ -389,6 +389,59 @@ ostest This is the NuttX test at ``apps/testing/ostest`` that is run against all new architecture ports to assure a correct implementation of the OS. +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 mode:: + + $ make menuconfig + -> Board Selection + -> (15) PM_STANDBY delay (seconds) + (0) PM_STANDBY 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. +- ULP coprocessor wakeup mode: Uses ULP co-processor to wake up the chip. Enabled with ``CONFIG_PM_ULP_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 + +Note: When normal mode COUNT is 0, it will switch to the next PM state where COUNT is not 0. + +Note: During light sleep, overall current consumption of board should drop from 22mA (without any system load) to 1.3 mA on ESP32-C6 DevkitC-1. + pwm --- diff --git a/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst b/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst index 5b5342a84b4..40c34419eec 100644 --- a/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst +++ b/Documentation/platforms/risc-v/esp32h2/boards/esp32h2-devkit/index.rst @@ -321,6 +321,59 @@ ostest This is the NuttX test at ``apps/testing/ostest`` that is run against all new architecture ports to assure a correct implementation of the OS. +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 mode:: + + $ make menuconfig + -> Board Selection + -> (15) PM_STANDBY delay (seconds) + (0) PM_STANDBY 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. +- ULP coprocessor wakeup mode: Uses ULP co-processor to wake up the chip. Enabled with ``CONFIG_PM_ULP_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 + +Note: When normal mode COUNT is 0, it will switch to the next PM state where COUNT is not 0. + +Note: During light sleep, overall current consumption of board should drop from 14mA (without any system load) to 880 μA on ESP32-H2 DevkitM-1. + pwm ---
