Skip to main content
VCasa.1
Associate II
July 13, 2020
Solved

Problem with Timers clock and interrupt periods

  • July 13, 2020
  • 1 reply
  • 1284 views

0693W000001smnSQAQ.pngHi, I have my STM32F407 with the following clock configuration, as I want to use TIM2-TIM5, the input clock of those Timers is APB1, and it is working at 84 MHz, I want TIM2 working with an interrupt every 1 sec, so I set the prescaler to 8400-1 so the timer will work at 10KHz, and the the Counter Period to 10000-1, so I will have an interrupt every 1s...

In the TIM2 Handler I have set a Toggle to one of the board LEDs, and it toggles every 3s, no every 1s, so I suppose that I have something wrong.

Here I attach you a screenshot of the Clock Configuration screen.

Thank you

Best regards

This topic has been closed for replies.
Best answer by VCasa.1

SOLVED, the problem was that my board has a 8MHz crystal not the 25MHz one...

1 reply

VCasa.1
VCasa.1AuthorBest answer
Associate II
July 13, 2020

SOLVED, the problem was that my board has a 8MHz crystal not the 25MHz one...