cancel
Showing results for 
Search instead for 
Did you mean: 

Confirming something about clocks

jaravena
Associate
Posted on December 15, 2014 at 16:07

Hello, I'm trying to confirm whether I understood the manual correctly.

When setting up a clock's prescaler and counter, I should use the clock of the periphery bus it's connected to, right?, so for TIM4, with APB1 working at 42Mhz (SYSCLK = 168, APB1 prescaler = 4), its base clock should be 84Mhz (because when APB1 prescaler != 1, the frecuency is doubled for clocks).
1 REPLY 1
Posted on December 15, 2014 at 19:39

Yes, the TIMCLK is usually 2x the APB clock except at the DIV1 setting. The clock source is taken one step back up the divider chain, it doesn't actually double anything. ie one less DIVIDE, not MULTIPLY

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..