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
This function will automatically disable all memory regions that are not used by the application.
To enable back unused RAM sections, call
power_down_unused_ram() powers down memory regions that are outside of the
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.
- group ram_pwrdn
Module for powering on and off RAM sections.
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.
Request powering down unused RAM sections.
Power down RAM sections which are not used by the application image.
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_down_ram(uintptr_t start_address, uintptr_t end_address)