49bd19f3f2
This patch adds a temporary workaround for the incorrect initialization of the SystemCoreClock global variable that is done for the application core of nRF5340 (see system_nrf5340_application.c) and that results in k_busy_wait() producing delays of twice the requested time. The problem is that the call to SystemCoreClockUpdate() that is done at the end of SystemInit() correctly sets the value of SystemCoreClock to reflect the hardware state after reset (HFCLK128M divided by 2), but then the SystemCoreClock variable is initialized (by z_data_copy() called from z_arm_prep_c()) to the __SYSTEM_CLOCK value that is defined as 128000000. This in turn results in nrfx_coredep_delay_us() (used by k_busy_wait() by default for nRF SoCs) delaying for twice the requested number of microseconds. The temporary workaround is to call SystemCoreClockUpdate() at a later stage of the system initialization, in its nRF53 specific part. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig.defconfig.nrf5340_CPUAPP_QKAA | ||
Kconfig.defconfig.nrf5340_CPUNET_QKAA | ||
Kconfig.defconfig.series | ||
Kconfig.series | ||
Kconfig.soc | ||
dts_fixup.h | ||
linker.ld | ||
soc.c | ||
soc.h |