2024-02-22 02:16 AM
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.
Solved! Go to Solution.
2024-02-22 06:10 AM
(timer update frequency) = (timer clock frequency) / (prescaler + 1) / (period + 1)
Prescaler=9999 and period = 1599 works, along with many other options.
2024-02-22 02:56 AM - edited 2024-02-22 02:58 AM
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
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-02-22 06:10 AM
(timer update frequency) = (timer clock frequency) / (prescaler + 1) / (period + 1)
Prescaler=9999 and period = 1599 works, along with many other options.
2024-02-22 09:09 PM
i need a formulas for calculate independently for timer prescaler and priod . and clear examples plz provide
2024-02-23 06:32 AM - edited 2024-02-23 06:33 AM
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.