This is the documentation for the latest (master) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.
CONFIG_SYS_CLOCK_TICKS_PER_SEC

System tick frequency (in ticks/second)

Type: int

Help

This option specifies the nominal 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).

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.

A value of 0 completely disables timer support in the kernel.

Defaults

Kconfig definitions

At boards/arm/mec1501modular_assy6885/Kconfig.defconfig:23

Included via Kconfig:8Kconfig.zephyr:24

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 32768
    depends on RTOS_TIMER && BOARD_MEC1501MODULAR_ASSY6885

At boards/arm/mec1501modular_assy6885/Kconfig.defconfig:37

Included via Kconfig:8Kconfig.zephyr:24

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 1000
    depends on !RTOS_TIMER && BOARD_MEC1501MODULAR_ASSY6885

At boards/arm/mec15xxevb_assy6853/Kconfig.defconfig:22

Included via Kconfig:8Kconfig.zephyr:24

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 32768
    depends on RTOS_TIMER && BOARD_MEC15XXEVB_ASSY6853

At boards/arm/mec15xxevb_assy6853/Kconfig.defconfig:37

Included via Kconfig:8Kconfig.zephyr:24

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 1000
    depends on !RTOS_TIMER && BOARD_MEC15XXEVB_ASSY6853

At boards/arm/npcx7m6fb_evb/Kconfig.defconfig:11

Included via Kconfig:8Kconfig.zephyr:24

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 1000

At boards/arm/qemu_cortex_m0/Kconfig.defconfig:32

Included via Kconfig:8Kconfig.zephyr:24

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 100
    depends on BOARD_QEMU_CORTEX_M0

At boards/riscv/hifive1/Kconfig.defconfig:8

Included via Kconfig:8Kconfig.zephyr:24

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 128
    depends on BOARD_HIFIVE1

At boards/riscv/hifive1_revb/Kconfig.defconfig:18

Included via Kconfig:8Kconfig.zephyr:24

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 128
    depends on BOARD_HIFIVE1_REVB

At soc/arm/nordic_nrf/Kconfig.defconfig:24

Included via Kconfig:8Kconfig.zephyr:25doc/_build/Kconfig/Kconfig.soc.defconfig:1

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 32768
    depends on SOC_FAMILY_NRF

At soc/arm/st_stm32/common/Kconfig.defconfig.series:16

Included via Kconfig:8Kconfig.zephyr:25doc/_build/Kconfig/Kconfig.soc.defconfig:1soc/arm/st_stm32/Kconfig.defconfig:3

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 4096 if STM32_LPTIM_TIMER && STM32_LPTIM_CLOCK_LSE
    default 4000 if STM32_LPTIM_TIMER && STM32_LPTIM_CLOCK_LSI
    depends on SOC_FAMILY_STM32

At soc/arm/ti_simplelink/cc13x2_cc26x2/Kconfig.defconfig.series:19

Included via Kconfig:8Kconfig.zephyr:25doc/_build/Kconfig/Kconfig.soc.defconfig:1soc/arm/ti_simplelink/Kconfig.defconfig:3

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 32768
    depends on SOC_SERIES_CC13X2_CC26X2

At soc/xtensa/intel_adsp/cavs_v15/Kconfig.defconfig.series:30

Included via Kconfig:8Kconfig.zephyr:25doc/_build/Kconfig/Kconfig.soc.defconfig:1soc/xtensa/intel_adsp/Kconfig.defconfig:6

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 50000
    depends on SOC_SERIES_INTEL_CAVS_V15

At soc/xtensa/intel_adsp/cavs_v18/Kconfig.defconfig.series:18

Included via Kconfig:8Kconfig.zephyr:25doc/_build/Kconfig/Kconfig.soc.defconfig:1soc/xtensa/intel_adsp/Kconfig.defconfig:6

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 50000
    depends on SOC_SERIES_INTEL_CAVS_V18

At soc/xtensa/intel_adsp/cavs_v20/Kconfig.defconfig.series:18

Included via Kconfig:8Kconfig.zephyr:25doc/_build/Kconfig/Kconfig.soc.defconfig:1soc/xtensa/intel_adsp/Kconfig.defconfig:6

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 50000
    depends on SOC_SERIES_INTEL_CAVS_V20

At soc/xtensa/intel_adsp/cavs_v25/Kconfig.defconfig.series:18

Included via Kconfig:8Kconfig.zephyr:25doc/_build/Kconfig/Kconfig.soc.defconfig:1soc/xtensa/intel_adsp/Kconfig.defconfig:6

Menu path: (Top)

config SYS_CLOCK_TICKS_PER_SEC
    int
    default 50000
    depends on SOC_SERIES_INTEL_CAVS_V25

At kernel/Kconfig:524

Included via Kconfig:8Kconfig.zephyr:30

Menu path: (Top) → General Kernel Options

config SYS_CLOCK_TICKS_PER_SEC
    int "System tick frequency (in ticks/second)"
    default 100 if QEMU_TARGET || SOC_POSIX
    default 10000 if TICKLESS_CAPABLE
    default 100
    help
      This option specifies the nominal 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).

      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.

      A value of 0 completely disables timer support in the kernel.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)