2021-03-17 16:18:26 +08:00
|
|
|
.. _stm32-pm-blinky-sample:
|
|
|
|
|
2021-06-01 22:47:08 +08:00
|
|
|
STM32 PM Blinky
|
|
|
|
###############
|
2021-03-17 16:18:26 +08:00
|
|
|
|
|
|
|
Overview
|
|
|
|
********
|
|
|
|
|
2021-06-01 22:47:08 +08:00
|
|
|
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.
|
2021-03-17 16:18:26 +08:00
|
|
|
|
|
|
|
.. _stm32-pm-blinky-sample-requirements:
|
|
|
|
|
|
|
|
Requirements
|
|
|
|
************
|
|
|
|
|
2021-06-01 22:47:08 +08:00
|
|
|
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
|
2022-02-03 03:07:56 +08:00
|
|
|
in core sleep states, as LPTIM (:dtcompatible:`st,stm32-lptim`).
|
2021-03-17 16:18:26 +08:00
|
|
|
|
|
|
|
Building and Running
|
|
|
|
********************
|
|
|
|
|
2021-06-01 22:47:08 +08:00
|
|
|
Build and flash Blinky as follows, changing ``stm32l562e_dk`` for your board:
|
2021-03-17 16:18:26 +08:00
|
|
|
|
|
|
|
.. zephyr-app-commands::
|
|
|
|
:zephyr-app: samples/basic/blinky
|
2021-06-01 22:47:08 +08:00
|
|
|
:board: stm32l562e_dk
|
2021-03-17 16:18:26 +08:00
|
|
|
:goals: build flash
|
|
|
|
:compact:
|
|
|
|
|
2021-06-01 22:47:08 +08:00
|
|
|
After flashing, the LED starts to blink.
|
|
|
|
|
|
|
|
PM configurations
|
|
|
|
*****************
|
|
|
|
|
2021-06-28 22:24:59 +08:00
|
|
|
By default, :kconfig:`CONFIG_PM_DEVICE` and :kconfig:`CONFIG_PM_DEVICE_RUNTIME` are
|
2021-06-01 22:47:08 +08:00
|
|
|
enabled, but user can also deactivate one or the other to see each configuration
|
|
|
|
in play.
|