STM32 systick frequency

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
gossen
Posts: 1
Joined: Thu Jul 31, 2014 12:16 pm

STM32 systick frequency

Post by gossen »

I have a question about systick timer load value calculation.
You can see at STM32F4 reference manual(RM0090) clock scheme (5.2, fig.9), that Cortex system timer frequency is equal HCLK frequency divided by 8.
Therefore I think, systick load value should be calculated as HCLK / (8 * CH_FREQUENCY).
But if you see ChibiOS-RT code (e.g. version 2.6.6), it calculated as STM32_HCLK / CH_FREQUENCY.
What is the reason?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32 systick frequency

Post by Giovanni »

Hi,

The Cortex-M can feed the systick from the system clock or from an external signal, that external signal is that /8 line. ChibiOS uses the system clock direct feed because it is platform independent.

Giovanni
Post Reply