2014-12-15 07:07 AM
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).2014-12-15 10:39 AM
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