Skip to content

Commit

Permalink
samples: nrf54l: remove direct RAM retention management
Browse files Browse the repository at this point in the history
RAM retention is now managed within sys_poweroff() call.

Signed-off-by: Nikodem Kastelik <[email protected]>
  • Loading branch information
nika-nordic authored and carlescufi committed Dec 4, 2024
1 parent 4c4c4f0 commit 6022463
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
11 changes: 0 additions & 11 deletions samples/bluetooth/peripheral_power_profiling/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
#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 @@ -682,14 +679,6 @@ 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();
#endif /* !IS_ENABLED(CONFIG_SOC_SERIES_NRF54HX) */
}
Expand Down
11 changes: 0 additions & 11 deletions samples/nfc/system_off/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
#include <nfc/ndef/text_rec.h>

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

#define SYSTEM_OFF_DELAY_S 3

Expand Down Expand Up @@ -150,14 +147,6 @@ static void system_off(struct k_work *work)
}
}

#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 6022463

Please sign in to comment.