cancel
Showing results for 
Search instead for 
Did you mean: 

setting clock in stm32f7

Zakba.1
Senior

Hi... for some reasons I cant regenerate my code from CubeMx but I need to change crystal 8M to oscillator 14.7456... in spite of replacing the clock function (void SystemClock_Config(void) ) with new one, my project does not work. what other changes do I need to consider for changing the clock in a project generated by CubeMx?

thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

Hello @Zakba.1​ 

If your project contains any code that is sensitive to timing (e.g delay loops...), you may need to update this code and consider the new oscillator frequency.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
KnarfB
Principal III

Well, why not generating 2 new dummy projects with the old and new settings and comparing the output. The new freq. may be to high for the old (PLL?) settings, and oscillator != crystal ?

hth

KnarfB

Well I tried that creating a dummy project with new clock configuration and replaced the generated system clock function with new one... this function as far as I know configures freq, pll, crystal or oscillator type in itself... except this function do I need to change any other configs in project?

Ps: I generated the code in cube with HAL lib

Post edited to adhere community guidelines.

FBL
ST Employee

Hello @Zakba.1​ 

If your project contains any code that is sensitive to timing (e.g delay loops...), you may need to update this code and consider the new oscillator frequency.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.