Skip to main content
Zakba.1
Associate III
April 18, 2023
Solved

setting clock in stm32f7

  • April 18, 2023
  • 2 replies
  • 1366 views

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

This topic has been closed for replies.
Best answer by FBL

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.

2 replies

KnarfB
Super User
April 18, 2023

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

Zakba.1
Zakba.1Author
Associate III
April 18, 2023

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.

FBLBest answer
Technical Moderator
April 19, 2023

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.Best regards,FBL