cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723ZG Timer1 Source clock

TOsso.1
Associate II

Hey

I try to work with the Timer1 in interrupt mode. I saw that Timer1 is belong to APB2 BUS. 
I configure my source clock to the TIMER1 to 96MHz (picture1),at APB2 Timer Clocks But I saw that the frequency is match to the number on APB2 Peripheral clock (48MHz). (In the interrupt I toggle gpio pin and I measure the frequency with oscilloscope)

I try to change the frequency and the configuration of the timer but I still get resault that match to APB2 Peripheral clock label and not to APB2 Timer Clocks.

I don't understand what is the source clock of the timer.

Thank you very much

picture1.jpg

3 REPLIES 3
TDK
Guru

The clock display in CubeMX is correct.

What is the calculation you are doing that is leading you to believe it is incorrect?

> In the interrupt I toggle gpio pin and I measure the frequency with oscilloscope

Note that interrupt speed is going to be limited by cpu availability. Try to stay below tens of kHz for interrupt frequency.

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

Hello @TOsso.1 

According to the reference manual, the frequency of the timer's clock depends on the APB prescaler corresponding to the bus to which the timer is connected, and on TIMPRE bit. Check Table 53. Ratio between clock timer and pclk.

 

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.


I'm out of offce with limited access to my emails.
Happy New Year!

Also note, that if the timer's period is 1/f thus interrupt's frequency is f and you toggle a pin in the interrupt once, then the resulting waveform on that pin has frequency f/2.

 

JW