Lines Matching +full:retained +full:- +full:ram

11 power failure (or during some low-power modes on some devices) nor should it be
12 stored to a non-volatile storage like :ref:`flash_api`, :ref:`eeprom_api`, or
13 battery-backed RAM.
15 The retention system builds on top of the retained data driver, and adds
16 additional software-level features to it for ensuring the validity of data.
18 the retained data memory section contains this specific value, and an optional
19 checksum (1, 2, or 4-bytes in size) of the stored data can be appended to the
21 the retained data sections into multiple distinct areas. For example, a 64-byte
22 retained data area could be split up into 4 bytes for a boot mode, 16 bytes for
25 per-instance using devicetree.
30 To use the retention system, a retained data driver must be setup for the board
32 RAM as non-init for this purpose. The retention system is then initialised as a
33 child node of this device 1 or more times - note that the memory region will
34 need to be decremented to account for this reserved portion of RAM. See the
38 .. code-block:: devicetree
42 compatible = "zephyr,memory-region", "mmio-sram";
44 zephyr,memory-region = "RetainedMem";
48 compatible = "zephyr,retained-ram";
50 #address-cells = <1>;
51 #size-cells = <1>;
53 /* This creates a 256-byte partition */
61 * data storage area is 256 - 3 = 253
71 /* This uses a 1-byte checksum */
75 /* This creates a 768-byte partition */
85 * storage area is 768 - 6 = 762 bytes
102 /* Reduce SRAM0 usage by 1KB to account for non-init area */
112 .. code-block:: C
132 areas by enabling :kconfig:option:`CONFIG_RETENTION_MUTEX_FORCE_DISABLE` -
152 node of ``zephyr,boot-mode``. See the following example:
154 .. code-block:: devicetree
158 compatible = "zephyr,memory-region", "mmio-sram";
160 zephyr,memory-region = "RetainedMem";
164 compatible = "zephyr,retained-ram";
166 #address-cells = <1>;
167 #size-cells = <1>;
178 zephyr,boot-mode = &retention0;
182 /* Reduce SRAM0 usage by 1 byte to account for non-init area */
193 .. code-block:: C