2
\$\begingroup\$

I am trying to use a timer from STM32F4 with ARM Cortex-M4 chip. I need to get the maximum frequency out of that timer for my application. The datasheet has two columns for that Max Interface Clock and Max Timer Clock.

What is the difference between those two?

enter image description here

\$\endgroup\$
2
\$\begingroup\$

Peripherals like timers and Usarts get their clocks via the APB prescalers. The Interface Clock is at the prescaled frequency, used for sequencing most peripheral functions. APB1 has a max allowed value of 42MHz, APB2 max 84 MHz.

The Timers have an oddity where the frequency fed to the clock input of the Timer Prescalers, when the APB prescaler is NOT /1, is twice the corresponding Interface Clock. Thus, when the SysClk is at the max of 168 Mhz, APB2 is prescaled by 2 to get 84 MHz, the Timers driven from APB1 get twice that, 168 MHz, into their prescalers . Same logic for APB1, /4 => 42 MHz i/f, *2 => 84 MHz => Timer prescalers.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.