cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F051R8 not working after clock configuration

GenuineDeveloper
Associate III

My device STM32F051R8 used to work without any issues prior to this. I was working with internal RC till then, and wanted to experiment with different clock source(HSE) and was trying out a code. It so happened that after flashing that code the device stopped working. Even simple program like toggling a GPIO pin is not working(the same program works on discovery board) even after changing the clock configuration back to the same internal RC source.

What happened here?

What is the solution/work around?

(Update: I was trying to check the code with the debugger but the debugger did not run and goes into infinite loop stating "no source available for "". I am using the free CooCox IDE)

Any inputs will be of great help.

@Community member​

@Community member​ 

@Community member​ 

1 REPLY 1

There is no reason call people out.

Look at the HSE source, the PLL settings and define for HSE_VALUE.

Instrument code so you can observe whether it is in the Error_Handler, HardFault_Handler, or any of the other while(1) loops you have in your code.

Even if there isn't source there might be symbols in the disassembly view, or you can take the address of the loop, and look at that compared to routines/symbols listed in the .MAP file, or as part of a .LST listing file.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..