
CONFIG_SYS_CLOCK_TICKS_PER_SEC
¶
System tick frequency (in ticks/second)
Type: int
Help¶
This option specifies the frequency of the system clock in Hz.
Depending on the choice made, an amount of possibly expensive math must occur when converting ticks to milliseconds and viceversa. Some values are optimized, and yield significantly less math.
The optimal values from a computational pointofview are 1000, 500, 250 and 125, since in these cases there is either no computation required, or it is all done via bitshifting. These also give a granularity from 1ms to 8ms.
Other good values are 100, 50, 25, 20 and 10. In this case, some math is required but is minimized. These are also values that necessitate a reduced number of clock interrupts per second, at the cost of granularity (10ms to 100ms).
All other values require some extensive 64bit math, and in some configurations even require calls to compiler builtin functions, and can require a nontrivial extra amount of stack space (e.g. around 80 bytes on x86).
Note that when available and enabled, in “tickless” mode this config variable specifies the minimum available timing granularity, not necessarily the number or frequency of interrupts delivered to the kernel.
Defaults¶
 1000 if
SOC_MCIMX7_M4
&&SOC_SERIES_IMX7_M4
 1000 if
SOC_MSP432P401R
&&SOC_SERIES_MSP432P4XX
 100
Kconfig definitions¶
At soc/arm/nxp_imx/mcimx7_m4/Kconfig.defconfig.mcimx7_m4:14
Included via Kconfig:10
→ Kconfig.zephyr:23
→ soc/arm/nxp_imx/Kconfig.defconfig:7
→ soc/arm/nxp_imx/mcimx7_m4/Kconfig.defconfig.series:18
Menu path: (top menu)
config SYS_CLOCK_TICKS_PER_SEC int default 1000 ifSOC_MCIMX7_M4
&&SOC_SERIES_IMX7_M4
depends onSOC_MCIMX7_M4
&&SOC_SERIES_IMX7_M4
At soc/arm/ti_simplelink/msp432p4xx/Kconfig.defconfig.msp432p401r:18
Included via Kconfig:10
→ Kconfig.zephyr:23
→ soc/arm/ti_simplelink/Kconfig.defconfig:3
→ soc/arm/ti_simplelink/msp432p4xx/Kconfig.defconfig.series:10
Menu path: (top menu)
config SYS_CLOCK_TICKS_PER_SEC int default 1000 ifSOC_MSP432P401R
&&SOC_SERIES_MSP432P4XX
depends onSOC_MSP432P401R
&&SOC_SERIES_MSP432P4XX
At kernel/Kconfig:528
Included via Kconfig:10
→ Kconfig.zephyr:31
Menu path: (top menu) → General Kernel Options
config SYS_CLOCK_TICKS_PER_SEC
int
prompt "System tick frequency (in ticks/second)"
default 100
help
This option specifies the frequency of the system clock in Hz.
Depending on the choice made, an amount of possibly expensive math must
occur when converting ticks to milliseconds and viceversa. Some values
are optimized, and yield significantly less math.
The optimal values from a computational pointofview are 1000, 500,
250 and 125, since in these cases there is either no computation
required, or it is all done via bitshifting. These also give a
granularity from 1ms to 8ms.
Other good values are 100, 50, 25, 20 and 10. In this case, some math
is required but is minimized. These are also values that necessitate a
reduced number of clock interrupts per second, at the cost of
granularity (10ms to 100ms).
All other values require some extensive 64bit math, and in some
configurations even require calls to compiler builtin functions, and
can require a nontrivial extra amount of stack space (e.g. around 80
bytes on x86).
Note that when available and enabled, in "tickless" mode
this config variable specifies the minimum available timing
granularity, not necessarily the number or frequency of
interrupts delivered to the kernel.
(Definitions include propagated dependencies, including from if’s and menus.)