Skip to main content
martin239955
Associate III
December 21, 2015
Question

Timer clockdivision and prescaler?

  • December 21, 2015
  • 1 reply
  • 956 views
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
    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    December 21, 2015
    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 VenmoUp vote any posts that you find helpful, it shows what's working..