This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 89f3d87c9685cd51dacc6efe289fe11d9633e76b Author: Marco Casaroli <[email protected]> AuthorDate: Sat Oct 17 20:09:09 2026 +0200 Documentation/examples: Add a page for pmstress. apps/examples/pmstress walks the power management states in a timed sequence, for current measurement, and on the rp23xx it can suspend to RAM until an RTC alarm. The example had no documentation page. Add the page, with the sequence, the suspend command and the configuration options. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- .../applications/examples/pmstress/index.rst | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Documentation/applications/examples/pmstress/index.rst b/Documentation/applications/examples/pmstress/index.rst new file mode 100644 index 00000000000..00f387d0c3d --- /dev/null +++ b/Documentation/applications/examples/pmstress/index.rst @@ -0,0 +1,35 @@ +=================================================== +``pmstress`` Power Management Current Staircase +=================================================== + +``pmstress`` walks the power management states in a fixed, timed sequence, +so that a logging power supply can record the current of each state with +no debugger or console attached. The sequence is: active (busy), idle and +standby, each for ``CONFIG_EXAMPLES_PMSTRESS_STEP_SECS``, then the deepest +state until power off. A 1 s full-speed burst comes before each step, so +the current trace shows where each step starts. + +``pmstress`` first turns the user LEDs off and prints the schedule. Then +it waits ``CONFIG_EXAMPLES_PMSTRESS_DISCONNECT_SECS``, so that you can +disconnect the debugger and the console. A debugger keeps power domains on. + +On the rp23xx, ``pmstress suspend [<seconds>]`` (default 10) suspends to +RAM with the ``BOARDIOC_RP23XX_SUSPEND`` boardctl() command. It sets an RTC +alarm on ``/dev/rtc0`` with ``RTC_SET_RELATIVE`` as the wake, and prints the +wake source after the resume. This needs ``CONFIG_RP23XX_PM_SUSPEND``, +``CONFIG_BOARDCTL_IOCTL``, ``CONFIG_RTC_DRIVER`` and ``CONFIG_RTC_ALARM``. +See :doc:`/platforms/arm/rp23xx/index`. + +Configuration +============= + +- ``CONFIG_EXAMPLES_PMSTRESS`` -- Enable the example. Needs ``CONFIG_PM``. +- ``CONFIG_EXAMPLES_PMSTRESS_STEP_SECS`` -- Seconds to hold each state. + Default 30. +- ``CONFIG_EXAMPLES_PMSTRESS_DISCONNECT_SECS`` -- Seconds to wait before the + run starts. Default 30. +- ``CONFIG_EXAMPLES_PMSTRESS_LEDPATH`` -- User LED device that is turned off + during the run. Default ``/dev/userleds``. Needs ``CONFIG_USERLED_LOWER``. +- ``CONFIG_EXAMPLES_PMSTRESS_PROGNAME``, ``CONFIG_EXAMPLES_PMSTRESS_PRIORITY`` + and ``CONFIG_EXAMPLES_PMSTRESS_STACKSIZE`` -- Program name, priority and + stack size.
