zephyr/samples/boards/stm32/backup_sram
Torsten Rasmussen 1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
..
src
CMakeLists.txt
README.rst
prj.conf
sample.yaml

README.rst

.. _stm32_backup_sram:

STM32 Backup SRAM
#################

Overview
********

Multiple STM32 microcontrollers have a small backup SRAM that can be used as a
NVM when VBAT pin is supplied with a voltage source, e.g. a coin button cell.

This example shows how to define a variable on the Backup SRAM. Each time the
application runs the current value is displayed and then incremented by one. If
VBAT is preserved, the incremented value will be shown on the next power-cycle.

.. note::

    On most boards VBAT is typically connected to VDD thanks to a jumper.
    To excercise this sample with an independent VBAT source, you will need to
    remove the jumper.

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

In order to run this sample, make sure to enable ``backup_sram`` node in your
board DT file.

.. zephyr-app-commands::
   :zephyr-app: samples/memc/stm32_backup_sram
   :board: nucleo_h743zi
   :goals: build
   :compact:

Sample Output
=============

.. code-block:: console

    Current value in backup SRAM: 11
    Next reported value should be: 12
    Keep VBAT power source and reset the board now!