RAM power-down

The RAM power-down library is a basic module for disabling unused sections of RAM, which allows to save power in low-power applications.

To disable unused RAM sections, call power_down_unused_ram(). This function will automatically disable all memory regions that are not used by the application. To enable back unused RAM sections, call power_up_unused_ram().

Note

power_down_unused_ram() powers down memory regions that are outside of the _image_ram_end boundary. Accessing RAM that is powered down results in a bus fault exception. Working with an indirectly accessed memory that is not associated with any variable or a memory segment does not cause the _image_ram_end symbol to increase its value. For this reason, do not access powered down RAM sections when using this power optimization method.

Note

power_down_unused_ram() does not power down segments of RAM reserved by the Partition Manager. If you need to reserve a segment of RAM, create your own RAM partition using the Partition Manager.

API documentation

Header file: include/ram_pwrdn.h
Source files: lib/ram_pwrdn/
group ram_pwrdn

Module for powering on and off RAM sections.

Functions

void power_down_ram(uintptr_t start_address, uintptr_t end_address)

Request powering down RAM sections for the given address range.

Power down RAM sections which fully fall within the given address range.

void power_up_ram(uintptr_t start_address, uintptr_t end_address)

Request powering up RAM sections for the given address range.

Power up RAM sections which overlap with the given address range.

void power_down_unused_ram(void)

Request powering down unused RAM sections.

Power down RAM sections which are not used by the application image.

Note

Some libc implementations use the memory area following the application image for heap. If this is the case and the application relies on dynamic memory allocations, this function should not be used.

void power_up_unused_ram(void)

Request powering up unused RAM sections.

Power up RAM sections which were disabled by power_down_unused_ram function.