Skip to main content
ASeyo
Associate II
July 19, 2019
Solved

STM32F1 system timer

  • July 19, 2019
  • 2 replies
  • 1428 views

Hi, I'm using STM32F103. I encountered a problem when using the system timer to generate a delay. The processor runs at 8MHz from reset, well I think, and I'm using that clock to generate a 1Ms delay. So, I've to load the SysTick LOAD register with 8000-1.

But it does't work as I expected. I assumed it would generate 1Ms but actually it generates a 0.1Ms. I literally don't know WHY. My code and the simulated output are below in the picture. Thanks in advance!0690X000009YvdxQAC.png0690X000009YvdsQAC.png

This topic has been closed for replies.
Best answer by Tesla DeLorean

Sure there's not code in SystemInit() setting the PLL to 72 MHz?

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
July 19, 2019

Sure there's not code in SystemInit() setting the PLL to 72 MHz?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ASeyo
ASeyoAuthor
Associate II
July 23, 2019

Maybe you are right. I have no idea on how to change the PLL configuration in SystemInit(). I just write some code whenever I need to configure the PLL .