Hi
This is a newbie question, but I could not find an answer.
I found the definition for system tick below, and I know that a virtual timer works on system ticks.
but how is the system Tick related to the MCU (STM32F4) frequency?
Would I change this definition below (in chconf.h) depending on my CPU quartz used?
Thanks
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
#if !defined(CH_FREQUENCY) || defined(__DOXYGEN__)
#define CH_FREQUENCY 1000
#endif
How long is a System Tick ?
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: How long is a System Tick ?
Hi,
The above definition is independent from the quartz frequency and system frequency, those details are resolved in other layers:
- In board.h there is the external clock frequency.
- In mcuconf.h there are the clock tree settings.
All the other clocks are calculated automatically from the the above, including the system tick.
Giovanni
The above definition is independent from the quartz frequency and system frequency, those details are resolved in other layers:
- In board.h there is the external clock frequency.
- In mcuconf.h there are the clock tree settings.
All the other clocks are calculated automatically from the the above, including the system tick.
Giovanni