cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I have a Problem with my Nucleo F413ZH Board. I want to use a standard Timer 6 or 10. Clocksorce APB1or2 9MHz, Prescaler 60000-1 equals f=150Hz, Counter Period 13499 it should take 90s to count. But the PeriodElapsedCallback ocures after 10sec?

JR46
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions
JR46
Associate II

OMG... I verified this in a new project and it worked.

Source of my problem was the IWDG i programmed but never set back... So the Programm restarted after his time Period. But also we had to set the APB frequence higher since with under 1MHz it wouldnt work.

Kind regards

John

View solution in original post

5 REPLIES 5
JR46
Associate II

If I write 1500 as Counter Period I get 10s but if I put in 13499 I geht around 33s now... how is this possible?

Sarra.S
ST Employee

Hello @JR46​ and welcome to the Community,

As you may know, the Counter Period is directly related to the frequency of the timer.

When the Counter Period is higher, the frequency of the timer is lower, leading to longer periods of time. This is based on the equation used to calculate the frequency, which is

F = 1 / (Counter Period * Timer Clock).

so when you increase the Counter Period, the frequency decreases, leading to longer periods of time.

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.

JR46
Associate II

Hello @Sarra.S​  thank you for the fast response.

Ok now I think I understand. And F is the frequency in which the Interrupt of the Timer ocures?

Kind regards

John

JR46
Associate II

Hello,

sadly your tip did not realy help me.

Even if I change my ARR/Timer Period it has no effect onn the Time tille the Interrupt ocures...

How is this possible?

Kind regards

John

JR46
Associate II

OMG... I verified this in a new project and it worked.

Source of my problem was the IWDG i programmed but never set back... So the Programm restarted after his time Period. But also we had to set the APB frequence higher since with under 1MHz it wouldnt work.

Kind regards

John