This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 RAM power off - How to know which banks/sections are in use

Hello -

We are working with the nRF52840 and SDK v17.0.0 and tuning our power consumption during System ON sleep. We understand how to wakeup the device using the RTC and also how to selectively power off RAM banks and sections. We know that powered off RAM sections lose their contents.

In order to reduce power consumption in System ON sleep, we'd like to power off unused RAM. What we don't understand is how to know at runtime what areas of RAM are currently in use and hence should not be powered off across System ON sleep. We use malloc() for all our dynamic allocations. The SoftDevice and SDK also allocate memory. The applications we support vary in complexity, so it is likely that we'll need some type of general solution. We are also using FreeRTOS with tickless idle enabled, so the System ON sleep will be entered from within the tickless idle function.

At any given time during execution, how can we know which RAM sections can be safely powered off? Are there memory allocators in the SDK and/or linker script features (aside from a .noinit section) that can be leveraged?

Regards,

Brian

Related