Victor Che
Victor Che

Reputation: 75

What exactly meant in FreeRTOS's configCPU_CLOCK_HZ description?

The configCPU_CLOCK_HZ option explanation starts with this:

Enter the frequency in Hz at which the internal clock that driver the peripheral used to generate the tick interrupt will be executing.

Although I do more or less understand what it means, I need some finer explanation of what exactly is said there. Removing obvious "the peripheral used to generate the tick interrupt" from the middle I'm getting the "Enter the frequency in Hz at which the internal clock that driver will be executing", and this phrase looks a bit uncoordinated to me. What did the autor want to say with this? Some "that" driver, unlike, say, "this"? What "that"? The context doesn't imply any "that" here.

Upvotes: 1

Views: 2517

Answers (1)

stathisv
stathisv

Reputation: 509

I think 'driver' should be 'drives' in that explanation.

configCPU_CLOCK_HZ is the frequency of the platform dependent timer that generates the tick interrupt. It is used by some ports to program the timer so it generates the correct FreeRTOS tick rate (see configTICK_RATE_HZ).

Example: configCPU_CLOCK_HZ is 1000000 (1 MHz) and configTICK_RATE_HZ is 100, then you configure the timer to generate an interrupt every 1000000/100 = 10000 ticks. That interrupt is your FreeRTOS system tick.

Take a look at an ARM Cortex-M port for one of the most common examples of this that uses the Cortex-M SysTick

Upvotes: 2

Related Questions