diff --git a/soc/nordic/nrf53/Kconfig b/soc/nordic/nrf53/Kconfig index 1ab7a7ac95e..d221f7772ff 100644 --- a/soc/nordic/nrf53/Kconfig +++ b/soc/nordic/nrf53/Kconfig @@ -8,6 +8,7 @@ config SOC_SERIES_NRF53X select ARM select SOC_COMPATIBLE_NRF53X select SOC_EARLY_INIT_HOOK + select SOC_LATE_INIT_HOOK select CPU_CORTEX_M33 select CPU_CORTEX_M_HAS_DWT select CPU_HAS_ARM_MPU diff --git a/soc/nordic/nrf53/soc.c b/soc/nordic/nrf53/soc.c index 75c6e5e0a4d..e15622b458c 100644 --- a/soc/nordic/nrf53/soc.c +++ b/soc/nordic/nrf53/soc.c @@ -551,6 +551,16 @@ void soc_early_init_hook(void) #if defined(CONFIG_SOC_DCDC_NRF53X_HV) || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(vregh)) nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_HIGH, true); #endif +} + +void soc_late_init_hook(void) +{ +#ifdef CONFIG_SOC_NRF53_RTC_PRETICK + int err = rtc_pretick_init(); + + __ASSERT_NO_MSG(err == 0); + (void)err; +#endif } @@ -558,8 +568,3 @@ void arch_busy_wait(uint32_t time_us) { nrfx_coredep_delay_us(time_us); } - - -#ifdef CONFIG_SOC_NRF53_RTC_PRETICK -SYS_INIT(rtc_pretick_init, POST_KERNEL, 0); -#endif