Skip to main content
TBell.2
Associate
Apr 13, 2022 12:49 PM UTC
Question

SystemClock_Config fails at startup after upgrading CubeMX app

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
Apr 13, 2022 1:16 PM UTC

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
Apr 13, 2022 1:18 PM UTC

tickstart = HAL_GetTick();

Line 501

TBell.2
TBell.2Author
Associate
Apr 13, 2022 1:19 PM UTC

It reports a bus fault

TBell.2
TBell.2Author
Associate
Apr 13, 2022 1:34 PM UTC

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

TBell.2
TBell.2Author
Associate
Apr 13, 2022 1:36 PM UTC

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

TDK
Apr 13, 2022 1:38 PM UTC

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
Apr 13, 2022 1:39 PM UTC

The clock is internal PLL

TBell.2
TBell.2Author
Associate
Apr 13, 2022 1:53 PM UTC

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