Skip to content

Commit e4957d4

Browse files
nika-nordicrlubos
authored andcommitted
samples: peripheral_power_profiling: nrf54l: disable RAM retention
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]> (cherry picked from commit 672f66c)
1 parent 6afafc8 commit e4957d4

File tree

1 file changed

+11
-0
lines changed
  • samples/bluetooth/peripheral_power_profiling/src

1 file changed

+11
-0
lines changed

samples/bluetooth/peripheral_power_profiling/src/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
#include <nfc/ndef/le_oob_rec.h>
2828

2929
#include <helpers/nrfx_reset_reason.h>
30+
#ifdef CONFIG_SOC_NRF54L15_CPUAPP
31+
#include <hal/nrf_memconf.h>
32+
#endif
3033

3134
#include "pwr_service.h"
3235

@@ -638,6 +641,14 @@ static void system_off(void)
638641
}
639642
}
640643

644+
#ifdef CONFIG_SOC_NRF54L15_CPUAPP
645+
/* Disable RAM retention in System OFF as it is not utilized by this sample. */
646+
uint32_t ram_sections = 8;
647+
648+
nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 0, BIT_MASK(ram_sections), false);
649+
nrf_memconf_ramblock_ret2_mask_enable_set(NRF_MEMCONF, 0, BIT_MASK(ram_sections), false);
650+
#endif
651+
641652
sys_poweroff();
642653
}
643654

0 commit comments

Comments
 (0)