Skip to content

Commit 7697eff

Browse files
hakonfamfabiobaltieri
authored andcommitted
soc: nrf54h: don't boot radio core if VTOR is not programmed
Booting the radio core when it is not programmed will typically cause a reset loop. This can happen when programming multiple images to a device, and the app core image is programmed before the radio core. With this change we avoid the reset loop in that case. Signed-off-by: Håkon Amundsen <[email protected]>
1 parent 78a6157 commit 7697eff

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

soc/nordic/nrf54h/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ config SOC_NRF54H20_CPURAD_ENABLE
7878
Radiocore, and also power will be requested to the Radiocore
7979
subsystem. The Radiocore will then start executing instructions.
8080

81+
config SOC_NRF54H20_CPURAD_ENABLE_CHECK_VTOR
82+
bool "Check VTOR before booting Radio core"
83+
default y
84+
depends on SOC_NRF54H20_CPURAD_ENABLE
85+
help
86+
Verify that VTOR is not 0xFFFFFFFF before booting the Radiocore.
87+
8188
config SOC_NRF54H20_CPURAD
8289
select SOC_NRF54H20_CPURAD_COMMON
8390

soc/nordic/nrf54h/soc.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,13 @@ void soc_late_init_hook(void)
203203
CONFIG_ROM_START_OFFSET);
204204
#endif
205205

206+
if (IS_ENABLED(CONFIG_SOC_NRF54H20_CPURAD_ENABLE_CHECK_VTOR) &&
207+
sys_read32((mem_addr_t)radiocore_address) == 0xFFFFFFFFUL) {
208+
LOG_ERR("Radiocore is not programmed, it will not be started");
209+
210+
return;
211+
}
212+
206213
/* Don't wait as this is not yet supported. */
207214
bool cpu_wait = false;
208215

0 commit comments

Comments
 (0)