• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

boards/04-Jan-2025-6859

dts/bindings/04-Jan-2025-145

src/04-Jan-2025-254194

CMakeLists.txtD04-Jan-2025205 85

README.rstD04-Jan-20251.4 KiB4633

prj.confD04-Jan-2025248 1312

sample.yamlD04-Jan-2025483 1817

README.rst

1.. zephyr:code-sample:: stm32_pm_suspend_to_ram
2   :name: Suspend to RAM
3   :relevant-api: subsys_pm_device_runtime
4
5   Use suspend to RAM low power mode on STM32.
6
7Overview
8********
9
10This sample is a minimum application to demonstrate basic power management
11behavior in a basic blinking LED set up using the :ref:`GPIO API <gpio_api>` in
12low power context + ADC measurements and entropy.
13SPI loopback is also available but not yet implemented for Suspend To RAM PM
14mode.
15
16.. _stm32-pm-suspend-to-ram-sample-requirements:
17
18Requirements
19************
20
21The board should support enabling PM. For a STM32 based target, it means that
22it should support a clock source alternative to Cortex Systick that can be used
23in core sleep states, as LPTIM (:dtcompatible:`st,stm32-lptim`).
24The board shall have an RTC to use it during the standby mode as a replacement
25for LPTIM (which is disabled). The board shall also have RAM retention to be
26able to restore context after standby.
27
28Building and Running
29********************
30
31Build and flash Blinky as follows, changing ``stm32wba55cg`` for your board:
32
33.. zephyr-app-commands::
34   :zephyr-app: samples/boards/st/power_mgmt/suspend_to_ram
35   :board: stm32wba55cg
36   :goals: build flash
37   :compact:
38
39After flashing, the LED starts to blink.
40
41PM configurations
42*****************
43
44By default, :kconfig:option:`CONFIG_PM_DEVICE` and :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME`
45are enabled.
46