What is a clock interrupt?

12,820

Clock or timer interrupts are interrupts from your timers present on your board. These timers are configured during board initialization where you can define the interrupt period.

1. Does it occur every clock tick?

Timers do not depend on tick. Both are same. After each interrupt or tick a variable called jiffies is incremented. This variable shows number of ticks or interrupts from system boot.

2. Does it occur every second?

Timers are configurable. You can configure to generate interrupt after 1 second or 1 millisecond, etc.

3. Is it some kind of an alarm that has to be triggered?

Alarms use timer devices too. But ticks or interrupts and alarm are different. Alarm is started for some task but ticks are recorded from boot up and not modified manually.

Please refer to any SoC datasheet like omap or STM, etc and read the timer chapter.

For an introduction to timers, jiffies, and ticks in the Linux kernel,
check out Chapter 07 Time, Delays and Deferred work of the book Linux Device Drivers [3e].

Share:
12,820
piggyback
Author by

piggyback

Updated on June 04, 2022

Comments

  • piggyback
    piggyback almost 2 years

    I can't find on the Internet a proper definition of this. I am wondering what is actually a clock interrupt and when does it occur:

    • Does it occur every clock tick?
    • Does it occur every second?
    • Is it some kind of an alarm that has to be triggered?