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?
STM32 systick frequency
Moderator: RoccoMarco
- 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
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
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