Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions soc/nordic/common/poweroff.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#include <zephyr/toolchain.h>
#include <zephyr/drivers/retained_mem/nrf_retained_mem.h>

#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)
#if defined(CONFIG_BUILD_WITH_TFM)
#include "tfm_platform_api.h"
#elif defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)
#include <hal/nrf_power.h>
#elif defined(CONFIG_SOC_SERIES_NRF54HX)
#include <power.h>
Expand Down Expand Up @@ -65,12 +67,17 @@ void z_sys_poweroff(void)
#endif

#if defined(CONFIG_SOC_SERIES_NRF54LX)
#if !defined(CONFIG_BUILD_WITH_TFM)
/* 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);
#endif

nrfx_reset_reason_clear(UINT32_MAX);
#endif
#if defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)

#if defined(CONFIG_BUILD_WITH_TFM)
tfm_platform_system_off();
#elif defined(CONFIG_SOC_SERIES_NRF51X) || defined(CONFIG_SOC_SERIES_NRF52X)
nrf_power_system_off(NRF_POWER);
#elif defined(CONFIG_SOC_SERIES_NRF54HX)
nrf_poweroff();
Expand Down
2 changes: 1 addition & 1 deletion soc/nordic/nrf54l/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ config SOC_NRF54L_CPUAPP_COMMON
select CPU_HAS_FPU
select HAS_HW_NRF_RADIO_IEEE802154
select HAS_POWEROFF
select HAS_NORDIC_RAM_CTRL
select HAS_NORDIC_RAM_CTRL if !BUILD_WITH_TFM
select HAS_SWO

config SOC_NRF54L05_CPUAPP
Expand Down
Loading