cancel
Showing results for 
Search instead for 
Did you mean: 

Timer clockdivision and prescaler?

martin239955
Associate II
Posted on December 21, 2015 at 21:21

Hello,

I see in my TIM_Handle_TypeDef variable that I can change the values of clockdivision and prescaler, but what is the difference between these two variables?

Martin
1 REPLY 1
Posted on December 21, 2015 at 22:36

Clock division drives the front-end pin filters.

Prescaler takes the TIMCLK from the APB, and divides that down, and that then drives the counter.

So if the TIMCLK is 84 MHz, and prescaler of 84-1 will clock the TIM->CNT at 1 MHz

There should be diagrams in the Reference Manual.

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