Skip to content

Commit 78a0009

Browse files
hakonfamrlubos
authored andcommitted
[nrf fromtree] 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]> (cherry picked from commit 7697eff)
1 parent f0d501d commit 78a0009

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
@@ -200,6 +200,13 @@ void soc_late_init_hook(void)
200200
CONFIG_ROM_START_OFFSET);
201201
#endif
202202

203+
if (IS_ENABLED(CONFIG_SOC_NRF54H20_CPURAD_ENABLE_CHECK_VTOR) &&
204+
sys_read32((mem_addr_t)radiocore_address) == 0xFFFFFFFFUL) {
205+
LOG_ERR("Radiocore is not programmed, it will not be started");
206+
207+
return;
208+
}
209+
203210
/* Don't wait as this is not yet supported. */
204211
bool cpu_wait = false;
205212

0 commit comments

Comments
 (0)