cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F1 system timer

ASeyo
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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 .