Skip to content

Commit f87f2dc

Browse files
jaz1-nordickartben
authored andcommitted
soc: nordic: common: poweroff: Set VPR to remain in its reset state
CM33 must write MEMCONF.POWER[VPR].RET = 0 before entering System OFF. This bit drives the vprSavedCtx input to VPR. Forcing it low will disable the Hibernate wake feature in VPR, so that VPR will remain in its reset state when waking from OFF. Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
1 parent 0f77563 commit f87f2dc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

soc/nordic/common/poweroff.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@
1616
#endif
1717
#if defined(CONFIG_SOC_SERIES_NRF54LX)
1818
#include <helpers/nrfx_reset_reason.h>
19+
#include <hal/nrf_memconf.h>
1920
#endif
2021

2122
#if defined(CONFIG_HAS_NORDIC_RAM_CTRL)
2223
#include <helpers/nrfx_ram_ctrl.h>
2324
#endif
2425

26+
#if defined(CONFIG_SOC_SERIES_NRF54LX)
27+
#define VPR_POWER_IDX 1
28+
#define VPR_RET_BIT MEMCONF_POWER_RET_MEM0_Pos
29+
#endif
30+
2531
void z_sys_poweroff(void)
2632
{
2733
#if defined(CONFIG_HAS_NORDIC_RAM_CTRL)
@@ -59,6 +65,9 @@ void z_sys_poweroff(void)
5965
#endif
6066

6167
#if defined(CONFIG_SOC_SERIES_NRF54LX)
68+
/* Set VPR to remain in its reset state when waking from OFF */
69+
nrf_memconf_ramblock_ret_enable_set(NRF_MEMCONF, VPR_POWER_IDX, VPR_RET_BIT, false);
70+
6271
nrfx_reset_reason_clear(UINT32_MAX);
6372
#endif
6473
#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)

0 commit comments

Comments
 (0)