Skip to main content
TBell.2
Associate
April 13, 2022
Question

SystemClock_Config fails at startup after upgrading CubeMX app

  • April 13, 2022
  • 8 replies
  • 1824 views

I seem to be having an issue on my custom board. I upgraded my CubeMX app and now when I attempt to debug the application fails when HAL_RCC_OscConfig is called in method SystemClock_Config at startup. It's consistent every time. I've scoured the configuration files to no avail.

This topic has been closed for replies.

8 replies

TDK
Super User
April 13, 2022

Step through the code, where does it fail within HAL_RCC_OscConfig?

"If you feel a post has answered your question, please click ""Accept as Solution""."
TBell.2
TBell.2Author
Associate
April 13, 2022

tickstart = HAL_GetTick();

Line 501

TBell.2
TBell.2Author
Associate
April 13, 2022

It reports a bus fault

TBell.2
TBell.2Author
Associate
April 13, 2022

If I click reset on the debugger and hit go it gets past this line every time

TBell.2
TBell.2Author
Associate
April 13, 2022

And, when it runs the software timers don't work at all.

TDK
Super User
April 13, 2022

Perhaps the clock source is unstable or not at the frequency you're expecting. HAL_GetTick is harmless, examine the code yourself.

"If you feel a post has answered your question, please click ""Accept as Solution""."
TBell.2
TBell.2Author
Associate
April 13, 2022

The clock is internal PLL

TBell.2
TBell.2Author
Associate
April 13, 2022

When I updated the CubeMX and the port files this started happening