zephyr/samples/boards/stm32/power_mgmt/standby_shutdown
Nick Ward 2d65acca3a drivers: gpio: use gpio_is_ready_dt helper function
Update `struct gpio_dt_spec` use with gpio_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-08-28 08:48:35 -05:00
..
src drivers: gpio: use gpio_is_ready_dt helper function 2023-08-28 08:48:35 -05:00
CMakeLists.txt samples: boards: stm32: Power_mgmt: sample for standby shutdownn mode 2023-03-17 14:20:05 +01:00
prj.conf samples: boards: stm32: Power_mgmt: sample for standby shutdownn mode 2023-03-17 14:20:05 +01:00
README.rst doc: fix :zephyr-app: paths 2023-07-17 16:51:16 -04:00
sample.yaml samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00

.. _stm32-pm-standby_shutdown-sample:

STM32 PM Standby shutdown
#########################

Overview
********

This sample is a minimum application to demonstrate basic power management of Standby mode and
shutdown mode
behavior in a basic blinking LED set up you can enter in shutdown mode or in standbymode mode.
Press and hold the user button:
when LED2 is OFF to enter to Shutdown Mode
when LED2 is ON to enter to Standby Mode
release the user button to exit from shutdown mode or from shutdown mode.

.. _stm32-pm-standby_shutdown-sample-requirements:

Requirements
************

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 (:dtcompatible:`st,stm32-lptim`).
For another board than nucleo_L476RG please adjust wakeup pin into config_wakeup_features().

Building and Running
********************

Build and flash standby_shutdown as follows, changing ``nucleo_L476RG`` for your board:

.. zephyr-app-commands::
   :zephyr-app: samples/boards/stm32/power_mgmt/standby_shutdown
   :board: nucleo_L476RG
   :goals: build flash
   :compact:

After flashing, the LED starts to blink.
Press and hold the user button:
when LED2 is OFF to enter to Shutdown Mode
when LED2 is ON to enter to Standby Mode
release the user button to exit from shutdown mode or from shutdown mode.

PM configurations
*****************

By default, :kconfig:option:`CONFIG_PM` is enabled.