AnsweredAssumed Answered

Wrong STM32 clock at startup

Question asked by MarcoM on Mar 31, 2014
Latest reply on Mar 31, 2014 by Jack Peacock
Hello, I have a problem similar to the one discussed in the post named "STM32F103RB - Different Clock Speed Between Reset?"{740361CE-882E-4684-B4E5-5C31FA23622C}

My board have an STM32F103VET7 and there is an 8MHz xtal for the HSE oscillator.
When I flash a program, the clock speed is correct: all timings are ok (baud retes, ecc) and a GPIO pulse made from the SysTick timer set to 1ms give exactly a pulse of 1ms.
When I power down and up the board, the clock speed is completely wrong: the 1ms pulse becames about 12ms, and so on.
I observe that when I have fresly programmed the board the clock is ALWAYS correct, and on all the following power on the clock is ALWAYS wrong.

The software is developed on the CooCox IDE. I am using the standard ST startup. All things works correctly, except for this big clock problem.

I have a customer with a gun pointing to my head... please I need a good idea to solve the issue.

Thank you very much.