Skip to content

Commit 175855e

Browse files
nordic-krchcarlescufi
authored andcommitted
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 <[email protected]>
1 parent 63da496 commit 175855e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

soc/nordic/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
2121

2222
config SYS_CLOCK_TICKS_PER_SEC
2323
default 128 if !TICKLESS_KERNEL
24-
default 10000 if NRF_GRTC_TIMER
24+
default 31250 if NRF_GRTC_TIMER
2525
default 32768
2626

2727
config ARCH_HAS_CUSTOM_BUSY_WAIT

0 commit comments

Comments
 (0)