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