2017-03-27 09:35 AM
Hello All,
I had been using stm32CubeMX v4.08 with w/wo freeRtos on stm32F103CB series mcu successfully , until recently when i upgraded cubeMx to version 4.20. I am totally stuck since then, since i have so got used to using HAL abstraction...
Calling systemClockConfig() in main() .. causes HAL_Timeout - causing function Error_Handler to be called in the following line..
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{ Error_Handler(); }on commenting out
/* Configure the system clock */
// SystemClock_Config();..or..
//Error_Handler();
the cpu runs but presumably on the systemInit()'s reset default HSI clock..
I assume its a bug in hal_rcc drivers...
Can you please suggest some way to get out of this....
Regards
Anish.
Solved! Go to Solution.
2017-04-28 02:21 AM
Hello All,
I confirm that the issue on the clock configuration has been corrected on CubeMX version 4.20.1.
Kind regards
Sirma
2017-03-27 10:28 AM
Hi,
This bug is confirmed in CubeMx 4.20 and will be fixed soon in the new patch release.
Sorry for the inconvenience it may bring.
Imen
2017-03-27 10:28 AM
http://www.stmcu.org/module/forum/data/attachment/forum/201703/15/162021y5r1y6jc267yd9x7.png
2017-04-18 09:23 AM
Just for your information, have tried with CubeMx versions -- 4.15 / 4.17 / 4.18 / 4.20 .. AND recently with -- 4.20.1
in all of them HSE fails to startup...
It is only working in CubeMx version 4.08...
One Common thing i have noted is CubeMX v4.08 uses stm32cube_fw_f1_v100,
while in all the rest i am using stm32cube_fw_f1_v140...
Highly appreciate any help cause need to get rid of a uart bug fixed in later firmware..
Sincere Regards,
Anish.
2017-04-27 06:37 AM
Hello Imen,
I have tested the latest cubeMx ver4.20.1 with the FW_lib(stm32cube_fw_f1_v140) on couple of other boards and everything seems to be working fine...There seems to be nothing wrong on the software side ..
The problem is coming in my custom board only (HSERDY flag not getting set), maybe due to a hardware reason which i will check (maybe coz of the crystal or load capacitors...) and let you know ...
Sorry to have bothered you, and thanks for all the help..
Regards,
Anish.
2017-04-28 02:21 AM
Hello All,
I confirm that the issue on the clock configuration has been corrected on CubeMX version 4.20.1.
Kind regards
Sirma
2017-04-30 11:59 AM
I recently updated a project to 4.20.1, and started having the HSE failure. I'm using a custom F103C8T6 board that was working last week ( I think the version was 4.18.0). Additionally, I soldered an 8 MHz crystal to a Nucleo F103RB board, and am running into the same error.
Any advice on troubleshooting? I've tried creating new projects in Cube from scratch for both boards (custom and Nucleo), and can't get past the HSE startup. I can't use the internal clock since I'm using the USB peripheral.
Thank you!
2017-05-01 03:54 AM
Hi David,
Since I got the problem only in my custom board ( I was using a 12Mhz crystal with 22pf load capacitors ), so i assume the problem is because of one or both of these two things.
I have yet to experiment with the crystal and the load capacitors (try 20 / 18pf)...and check the pulse with a scope....
although the same component pair work perfectly alright with all other ICs (maybe stm's are sensitive in clock stability check..)
Can you also try changing HSE_STARTUP_TIMEOUT values from 100-5000 just to check clock stability (read of similar solution in some thread..)...
Request you to please keep us posted if you find any developments...
Regards,
Anish.
PS-Since i tested the concept on a development board with HSE at 12Mhz (wanted to save power) and found everything alright , that I got on and designed the custom board and didnt realize that it was actually running on HSI clock (since Cube_4.08 didnt have a HAL_OK check in clock initialization). I only realized it when i upgraded to cube4.20 ..
:(
2017-05-01 10:47 AM
Thank you for your reply!
My board is working again, but I'm not sure why.
I created a new Cube project again, compiled, programmed the board, and ran into the same error. I tried commenting out the HAL's clock-config function and replacing it with my own, but the HSE Ready bit never got set.
I assumed I might have a damaged board, so I grabbed a board from an older project and loaded it with the Cube's software. It worked!
I went back to my original board, loaded the code, and it worked too. At this point, I'm not sure what the problem is. I'm thinking it is a problem with either my IDE or my programmer (using a Nucleo Board as an ST Link).