2019-07-26 07:25 AM
Hello,
I ran into a problem with a STM32F051K6T and cannot figure out where the problem is.
With Cube I configure the controller with UART (TX-only 115.2kBd) and polling on ADC_IN0.
The generated code for uVision compiles and loads errorfree.
But even the "hello world" in section "USER CODE BEGIN 2" won't come. the controller crashes earlier and enters an endless loop with:
__HAL_RCC_HSI14_ENABLE();
in: SystemClock_Config
Without the ADC it runs.
Exactly the same set-up I can run on an F103, F334, and L412 without problems.
Version of Cube is 5.2.0 and uVision V5.27.1.0.
Any idea?
Regards, Manitux
2019-07-26 08:11 AM
Suggests the clock isn't present or isn't starting.
Compilers only deal with syntax errors, not going to spot errors in logic or hardware.
Perhaps instead of letting CubeMX scramble your breakfast, you could look at the HAL examples, and use/test those, frankly a higher probability of working.
2019-07-30 03:45 AM
Thank you. Good idea to check the clock settings.
Actually I just continued the project evaluation on the L412 but I will have to come back to the 051 very soon. (took me 5 miuntes to change the chip - compared to hours of playing with the Cube and failed).
Somehow I expected Cube to be so reliable that this simple function gets all the settings done correctly. Somehow strange that this issus stops me at the very first step of a project - never seen this with other controller IDEs. Does not make much sense to continue with HAL...
Thanks, Manitux