zephyr/soc/arm/nordic_nrf/nrf53
Andrzej Głąbek 49bd19f3f2 soc: nrf5340: Fix busy waiting on nRF5340 application core
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>
2020-01-03 14:19:38 +01:00
..
CMakeLists.txt soc: arm: nordic_nrf: remove custom fixed MPU region definition 2019-12-09 11:51:14 -05:00
Kconfig.defconfig.nrf5340_CPUAPP_QKAA
Kconfig.defconfig.nrf5340_CPUNET_QKAA
Kconfig.defconfig.series
Kconfig.series
Kconfig.soc soc: arm: nordic: nrf53: add nfct hw in kconfig 2019-12-16 15:44:09 +01:00
dts_fixup.h soc: nrf: update dts_fixup.h to SPI DT 2019-12-13 17:10:24 -06:00
linker.ld arch: arm: Move ARM code to AArch32 sub-directory 2019-12-20 11:40:59 -05:00
soc.c soc: nrf5340: Fix busy waiting on nRF5340 application core 2020-01-03 14:19:38 +01:00
soc.h