From f87f2dc9b29e6908ea0f2cf3095a2484328ef6ab Mon Sep 17 00:00:00 2001 From: Jakub Zymelka Date: Thu, 17 Apr 2025 13:21:49 +0200 Subject: [PATCH] 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 --- soc/nordic/common/poweroff.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/soc/nordic/common/poweroff.c b/soc/nordic/common/poweroff.c index 857b2f38078..ebce3aae77c 100644 --- a/soc/nordic/common/poweroff.c +++ b/soc/nordic/common/poweroff.c @@ -16,12 +16,18 @@ #endif #if defined(CONFIG_SOC_SERIES_NRF54LX) #include +#include #endif #if defined(CONFIG_HAS_NORDIC_RAM_CTRL) #include #endif +#if defined(CONFIG_SOC_SERIES_NRF54LX) +#define VPR_POWER_IDX 1 +#define VPR_RET_BIT MEMCONF_POWER_RET_MEM0_Pos +#endif + void z_sys_poweroff(void) { #if defined(CONFIG_HAS_NORDIC_RAM_CTRL) @@ -59,6 +65,9 @@ void z_sys_poweroff(void) #endif #if defined(CONFIG_SOC_SERIES_NRF54LX) + /* Set VPR to remain in its reset state when waking from OFF */ + nrf_memconf_ramblock_ret_enable_set(NRF_MEMCONF, VPR_POWER_IDX, VPR_RET_BIT, false); + nrfx_reset_reason_clear(UINT32_MAX); #endif #if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)