cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743ZI2 TIMER calculation

saikumar
Associate III

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.  

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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

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

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
STTwo-32
ST Employee

Hello @saikumar and welcome to the ST Community 😊.

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.

TDK
Guru

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

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

If you feel a post has answered your question, please click "Accept as Solution".

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

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.

If you feel a post has answered your question, please click "Accept as Solution".