Skip to content

Commit

Permalink
samples: peripheral_power_profiling: nrf54l: disable RAM retention
Browse files Browse the repository at this point in the history
Disabled RAM retention saves energy in System OFF mode
and can be used to showcase nRF54L15 low power consumption.

Signed-off-by: Nikodem Kastelik <[email protected]>
  • Loading branch information
nika-nordic committed Nov 5, 2024
1 parent c7dc2fb commit b780019
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions samples/bluetooth/peripheral_power_profiling/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include <nfc/ndef/le_oob_rec.h>

#include <helpers/nrfx_reset_reason.h>
#ifdef CONFIG_SOC_NRF54L15_CPUAPP
#include <hal/nrf_memconf.h>
#endif

#include "pwr_service.h"

Expand Down Expand Up @@ -638,6 +641,14 @@ static void system_off(void)
}
}

#ifdef CONFIG_SOC_NRF54L15_CPUAPP
/* Disable RAM retention in System OFF as it is not utilized by this sample. */
uint32_t ram_sections = 8;

nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 0, BIT_MASK(ram_sections), false);
nrf_memconf_ramblock_ret2_mask_enable_set(NRF_MEMCONF, 0, BIT_MASK(ram_sections), false);
#endif

sys_poweroff();
}

Expand Down

0 comments on commit b780019

Please sign in to comment.