soc: nordic: Use 31250 Hz as system tick rate for GRTC

So far 10 kHz tick rate was used but it has 2 drawbacks:
- kernel timer precision is limited to 100 us which is worse compared
to 30 us on platforms which use RTC (which had 32768 Hz tick rate)
- GRTC has 1 MHz frequency so tick rate requires dividing by 100 during
 timeout calculation. When 31250 Hz is used (which is 1000000 / 32)
then dividing can be done with bit shifting and it is faster (> 2 times
faster on Cortex-M33 and >8 times faster on VPR - RISCV).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2024-07-15 14:01:27 +02:00 committed by Carles Cufí
commit 175855e0d8

View file

@ -21,7 +21,7 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
config SYS_CLOCK_TICKS_PER_SEC
default 128 if !TICKLESS_KERNEL
default 10000 if NRF_GRTC_TIMER
default 31250 if NRF_GRTC_TIMER
default 32768
config ARCH_HAS_CUSTOM_BUSY_WAIT