-
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 vice-versa. Some values are optimized, and yield significantly less math.
The optimal values from a computational point-of-view are 1000, 500, 250 and 125, since in these cases there is either no computation required, or it is all done via bit-shifting. 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 64-bit math, and in some configurations even require calls to compiler built-in functions, and can require a non-trivial extra amount of stack space (e.g. around 80 bytes on x86).
Defaults¶
- 1000 if
SOC_MCIMX7_M4
&&SOC_SERIES_IMX7_M4
- 1000 if
SOC_MSP432P401R
&&SOC_SERIES_MSP432P4XX
- 100
Kconfig definitions¶
At arch/arm/soc/nxp_imx/mcimx7_m4/Kconfig.defconfig.mcimx7_m4:14
Included via Kconfig:10
→ Kconfig.zephyr:20
→ arch/arm/soc/nxp_imx/Kconfig.defconfig:7
→ arch/arm/soc/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 arch/arm/soc/ti_simplelink/msp432p4xx/Kconfig.defconfig.msp432p401r:18
Included via Kconfig:10
→ Kconfig.zephyr:20
→ arch/arm/soc/ti_simplelink/Kconfig.defconfig:1
→ arch/arm/soc/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:494
Included via Kconfig:10
→ Kconfig.zephyr:25
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 vice-versa. Some values
are optimized, and yield significantly less math.
The optimal values from a computational point-of-view are 1000, 500,
250 and 125, since in these cases there is either no computation
required, or it is all done via bit-shifting. 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 64-bit math, and in some
configurations even require calls to compiler built-in functions, and
can require a non-trivial extra amount of stack space (e.g. around 80
bytes on x86).
(Definitions include propagated dependencies, including from if’s and menus.)