samples: boards: stm32: exit Poweroff using wkup pins & gpios
This sample demonstrates how gpio pins can be used to power on the system after a Poweroff, just like a reset pin. The user only needs to add the STM32_GPIO_WKUP flag to the gpio pin in "gpios" property of a DT device such a button or a sensor. The samples Powers off the system after a delay then the user can power it on with the user button that has the STM32_GPIO_WKUP flag in DT. Only works on STM32 boards that support Zephyr POWEROFF (U5, WL, WB, & L4 SoC series), & also have a user button whose GPIO pin is associated with a wake-up pin (see PWR node in SoC dtsi file). Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
This commit is contained in:
parent
323fcf94f9
commit
80180188b1
9 changed files with 194 additions and 0 deletions
7
samples/boards/stm32/power_mgmt/wkup_pins/prj.conf
Normal file
7
samples/boards/stm32/power_mgmt/wkup_pins/prj.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
CONFIG_POWEROFF=y
|
||||
CONFIG_STM32_WKUP_PINS=y
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_GPIO_KEYS=y
|
||||
CONFIG_PM=n
|
||||
CONFIG_PM_DEVICE=n
|
||||
CONFIG_PM_DEVICE_RUNTIME=n
|
Loading…
Add table
Add a link
Reference in a new issue