Skip to main content
Graduate
February 22, 2024
Solved

STM32H743ZI2 TIMER calculation

  • February 22, 2024
  • 2 replies
  • 1793 views

Im using stm32h743zi2 microcontroller and , cortext M7 processor , so i need prescalar value and period values of TIM5 for 80milli sec . here im using main clock is 400Mhz and timer bus clock is 200Mhz . please can anyone suggest me a flexible solution. 

And give me the formulas for calculating the timers prescalar and period.  

    This topic has been closed for replies.
    Best answer by TDK

    (timer update frequency) = (timer clock frequency) / (prescaler + 1) / (period + 1)

    Prescaler=9999 and period = 1599 works, along with many other options.

    2 replies

    Technical Moderator
    February 22, 2024

    Hello @saikumar and welcome to the ST Community :smiling_face_with_smiling_eyes:.

    I suggest you to take a look at this article. It should answer your question.

    You could Also refer to this example to see how it works (read the Readme file for details).

    Best Regards.

    STTwo-32 

    TDKAnswer
    Super User
    February 22, 2024

    (timer update frequency) = (timer clock frequency) / (prescaler + 1) / (period + 1)

    Prescaler=9999 and period = 1599 works, along with many other options.

    saikumarAuthor
    Graduate
    February 23, 2024

    i need a formulas for calculate independently for timer prescaler and priod . and clear examples plz provide 

    Super User
    February 23, 2024

    I don't know bud, I literally calculated them for you and gave you the formula for the update frequency. If that's not enough, I'm not interested in helping more. Plenty of resources out there for people with the motivation to read. Best of luck.