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:
parent
733eaa29b9
commit
366a64cb1e
3 changed files with 22 additions and 25 deletions
|
@ -1,42 +1,40 @@
|
|||
.. _stm32-pm-blinky-sample:
|
||||
|
||||
Blinky
|
||||
######
|
||||
STM32 PM Blinky
|
||||
###############
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
Blinky is a simple application which blinks an LED forever using the :ref:`GPIO
|
||||
API <gpio_api>` in low power context.
|
||||
This sample is a minimum application to demonstrate basic power management
|
||||
behavior in a basic blinking LED set up using the :ref:`GPIO API <gpio_api>` in
|
||||
low power context.
|
||||
|
||||
.. _stm32-pm-blinky-sample-requirements:
|
||||
|
||||
Requirements
|
||||
************
|
||||
|
||||
You will see this error if you try to build Blinky for an unsupported board:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
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.
|
||||
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
|
||||
in core sleep states, as LPTIM (:ref:`dtbinding_st_stm32_lptim`).
|
||||
|
||||
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: samples/basic/blinky
|
||||
:board: nucleo_l476rg
|
||||
:board: stm32l562e_dk
|
||||
:goals: build flash
|
||||
: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.
|
||||
|
|
|
@ -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
|
|
@ -3,8 +3,3 @@ CONFIG_GPIO=y
|
|||
CONFIG_PM=y
|
||||
CONFIG_PM_DEVICE=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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue