I am using an STM32 board (F7 series), and am looking through the HAL API documentation. When I initialize a timer, I see two values, Prescaler and ClockDivision. Now I understand that the Prescaler is used to divide the frequency of the clock. However, what is the ClockDivision supposed to do? I see it has three possible values, DIV1, DIV2, and DIV4.

My auto-generated code says the following.

enter image description here

enter image description here

  • 1
    \$\begingroup\$ I have found a prescaler and a master PLL in the STM32 user guide, but no mention of a divider, which maybe external to the MPU. We need the HAL chart or image to know what your taking about. \$\endgroup\$
    – user105652
    Mar 5, 2018 at 1:07
  • 1
    \$\begingroup\$ Added a screenshot of the code with the ClockDivision. I tried to make the code into a code block instead of pasting an image, but it doesn't seem to be formatting correctly... \$\endgroup\$
    – ArKi
    Mar 5, 2018 at 6:53

1 Answer 1


With a big assumption that everything below holds true or at least be similar to F7 series description. I could be completely wrong! Please double check!

According to the stm32 F4 family datasheet register description, the "ClockDivision" stands for

CKD: This bit-field indicates the division ratio between the timer clock (CK_INT) frequency and the dead-time and sampling clock (tDTS)used by the dead-time generators and the digital filters (ETR, TIx),

00: tDTS=tCK_INT

01: tDTS=2*tCK_INT

10: tDTS=4*tCK_INT

11: Reserved, do not program this value

I could not find any specific documentation related to F7 series and I am not quite aware of dead-time generators usage but ETR stands for "External Trigger Input".

Beware TIM1 is a special Timer, the same description do not hold true for other general pupose timers(ex. TIM2 etc.)

Also, HAL API Documentation is particularly not useful as it is just an accumulation of all the HAL Library comments without any description. If you are still interested, this might be helpful for you.

  • 1
    \$\begingroup\$ It is the same description for the TIM1/TIM8 of the F7. See STM32F7 ref manual chapters 22.4.1. For the other timers, it is almost the same description, but mentioning only the digital filters, not the dead-time generator (see chapters 23.4.1, 24.4.1, 24.5.1). \$\endgroup\$
    – dim
    Mar 5, 2018 at 8:28
  • \$\begingroup\$ Similar question and discussion, linked for posterity: community.st.com/s/question/0D50X0000B42Wh5/… \$\endgroup\$
    – seth
    Apr 7, 2020 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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