README.rst
1.. _stm32-pm-standby_shutdown-sample:
2
3STM32 PM Standby shutdown
4#########################
5
6Overview
7********
8
9This sample is a minimum application to demonstrate basic power management of Standby mode and
10shutdown mode
11behavior in a basic blinking LED set up you can enter in shutdown mode or in standbymode mode.
12Press and hold the user button:
13when LED2 is OFF to enter to Shutdown Mode
14when LED2 is ON to enter to Standby Mode
15release the user button to exit from shutdown mode or from shutdown mode.
16
17.. _stm32-pm-standby_shutdown-sample-requirements:
18
19Requirements
20************
21
22The board should support enabling PM. For a STM32 based target, it means that
23it should support a clock source alternative to Cortex Systick that can be used
24in core sleep states, as LPTIM (:dtcompatible:`st,stm32-lptim`).
25For another board than nucleo_L476RG please adjust wakeup pin into config_wakeup_features().
26
27Building and Running
28********************
29
30Build and flash standby_shutdown as follows, changing ``nucleo_L476RG`` for your board:
31
32.. zephyr-app-commands::
33 :zephyr-app: samples/boards/stm32/power_mgmt/standby_shutdown
34 :board: nucleo_L476RG
35 :goals: build flash
36 :compact:
37
38After flashing, the LED starts to blink.
39Press and hold the user button:
40when LED2 is OFF to enter to Shutdown Mode
41when LED2 is ON to enter to Standby Mode
42release the user button to exit from shutdown mode or from shutdown mode.
43
44PM configurations
45*****************
46
47By default, :kconfig:option:`CONFIG_PM` is enabled.
48