2020-07-09 02:40 AM
I am trying to understand how to setup the microcontroller (STM32F030 in this case) to use external oscillator. I am using blinking LED as a test to see if the code is running.
To setup the HSE I did following:
When I run the microcontroller it runs even if I disconnect the external oscillator.
I am not sure if the microcontroller goes to internal RC when there is no external oscillator or I need to do some additional work?
Solved! Go to Solution.
2020-07-09 06:18 AM
Read the RCC registers and post them here, or you can check them against their description in the reference manual.
Code generated by CubeMX supports only two kinds of error handling, either ignoring any problem or locking up. Never use it in production code.
2020-07-09 06:11 AM
The default CubeMX generated code will let the program continue even if the HSE fails to initialize. That may be what is happening here. I would instrument the Error_Handler() function with an infinite loop or something else to prevent it from returning immediately.
2020-07-09 06:18 AM
Read the RCC registers and post them here, or you can check them against their description in the reference manual.
Code generated by CubeMX supports only two kinds of error handling, either ignoring any problem or locking up. Never use it in production code.