Skip to main content
JGree.111
Associate
Jan 25, 2019 2:41 AM UTC
Solved

STM32F105RBT6 systick slower than expected

0690X000006DEUHQA4.jpgI write a delay function using systick,it works well in stm32f103rbt6,but the same function does not works well when I select another chip stm32f105rbt6.when I toggle the led every 500ms,it is actually toggled every 1562ms,much slower than expected when I measured the delayed time using the oscilloscope.I have checked the 8M Crystal/Ceramic resonators and found it works well.Please help me find the problem,thank you very much!

compiler:ARM MDK 5.15

LED PIN:PD2

RCC:8M Crystal/Ceramic resonators

This topic has been closed for replies.
JGree.111
JGree.111Best answer
Associate
Jan 25, 2019 6:47 AM UTC

Thank you very much,I've just solved this problem,the reason is that the standard library code take the Crystal/Ceramic resonator to be 25M as default,but actually,I used an 8M Crystal/Ceramic resonator,so I must modify the standard library to adapt this change.

anyway,thanks for your help!

3 replies

Tesla DeLorean
Guru
Jan 25, 2019 5:12 AM UTC

Make sure HSE_VALUE (define) is 8000000 and not 25000000

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
JGree.111
JGree.111AuthorBest answer
Associate
Jan 25, 2019 6:47 AM UTC

Thank you very much,I've just solved this problem,the reason is that the standard library code take the Crystal/Ceramic resonator to be 25M as default,but actually,I used an 8M Crystal/Ceramic resonator,so I must modify the standard library to adapt this change.

anyway,thanks for your help!

JGree.111
JGree.111Author
Associate
Jan 25, 2019 6:46 AM UTC

I've just solved this problem,the reason is that the standard library code take the Crystal/Ceramic resonator to be 25M as default,but actually,I used an 8M Crystal/Ceramic resonator,so I must modify the standard library to adapt this change.