samples/boards/stm32: PM Blinky: Rework README

Rework README to provide a correct and understandable status.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2021-06-01 16:47:08 +02:00 committed by Kumar Gala
commit 366a64cb1e
3 changed files with 22 additions and 25 deletions

View file

@ -1,42 +1,40 @@
.. _stm32-pm-blinky-sample: .. _stm32-pm-blinky-sample:
Blinky STM32 PM Blinky
###### ###############
Overview Overview
******** ********
Blinky is a simple application which blinks an LED forever using the :ref:`GPIO This sample is a minimum application to demonstrate basic power management
API <gpio_api>` in low power context. behavior in a basic blinking LED set up using the :ref:`GPIO API <gpio_api>` in
low power context.
.. _stm32-pm-blinky-sample-requirements: .. _stm32-pm-blinky-sample-requirements:
Requirements Requirements
************ ************
You will see this error if you try to build Blinky for an unsupported board: The board should support enabling PM. For a STM32 based target, it means that
it should support a clock source alternative to Cortex Systick that can be used
.. code-block:: none in core sleep states, as LPTIM (:ref:`dtbinding_st_stm32_lptim`).
Unsupported board: led0 devicetree alias is not defined
The board must have an LED connected via a GPIO pin. These are called "User
LEDs" on many of Zephyr's :ref:`boards`. The LED must be configured using the
``led0`` :ref:`devicetree <dt-guide>` alias. This is usually done in the
:ref:`BOARD.dts file <devicetree-in-out-files>` or a :ref:`devicetree overlay
<set-devicetree-overlays>`.
The board should support enabling PM.
Building and Running Building and Running
******************** ********************
Build and flash Blinky as follows, changing ``nucleo_l476rg`` for your board: Build and flash Blinky as follows, changing ``stm32l562e_dk`` for your board:
.. zephyr-app-commands:: .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky :zephyr-app: samples/basic/blinky
:board: nucleo_l476rg :board: stm32l562e_dk
:goals: build flash :goals: build flash
:compact: :compact:
After flashing, the LED starts to blink. Blinky does not print to the console. After flashing, the LED starts to blink.
PM configurations
*****************
By default, :option:`CONFIG_PM_DEVICE` and :option:`CONFIG_PM_DEVICE_RUNTIME` are
enabled, but user can also deactivate one or the other to see each configuration
in play.

View file

@ -0,0 +1,4 @@
# Disable DEBUG in order to enter core low power states.
# WARNING: requires to erase the device (using STM32CubeProgrammer for instance)
# for next flashing actions
CONFIG_DEBUG=y

View file

@ -3,8 +3,3 @@ CONFIG_GPIO=y
CONFIG_PM=y CONFIG_PM=y
CONFIG_PM_DEVICE=y CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y CONFIG_PM_DEVICE_RUNTIME=y
# DEBUG is enabled in order to ease testing in CI
# Disable DEBUG in order to enter core low power states.
# Warning: requires to erase the device for next flashing actions
CONFIG_DEBUG=y