2017-04-04 12:54 AM
hi to all, i update the firmware of my the my stm nucleo L152RE with st-link to the version
'ST-link firmware update V2.J27.M15 STM32 Debug+Mass storage' and
later i update STM32CubeMX to 4.20 version
i use the cube mx to configure the gpio, when i configure RCC and RTC i see that the system crashes
i see the compiler crashes when arrived in this pointif (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{ Error_Handler(); }the system go in Error_Handler();
I use old example, i created it one month ago, i don't open CubeMX i use only IAR for open the project butnow this example don't work and i see the compiler crashes when arrived in this point:
if (HAL_RTC_Init(&hrtc) != HAL_OK)
{ Error_Handler(); }the system go in Error_Handler();
if i use old firmware, ST-link firmware update V2.J20.M4 STM32 Debug+Mass storage my old example work well.
excuse me for my bad english
best regards
Antonio
#bug #stm32cube #st-lik-utility #stm32l152re2017-04-04 01:27 AM
Hi
Buonanno.Antonio
,This is confirmed bug in RCC clock configuration with
CubeMx 4.20 and will be fixed soon
in the new patch release.
The issue occurred due to this error line:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE;and y
ou should replace it
with the following line that will resolve your problem:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
Please try this update then let me if this resolve your problem.
We apologize for any inconvenience this may cause.
Imen
2017-04-04 04:28 AM
Hi Imen thanks for your answer but i have this configuretion code from CubeMX:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSE;
when i use the code that you posted it , i see the equal problem
2017-04-04 05:00 AM
Hi
Buonanno.Antonio
,In your case, you should removethe oscillator that you don't need
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_***;
Imen
2017-04-04 07:07 AM
thanks, now work only if you select, in cubemx, the CSS ENABLED in RTC/LCD Source Mux and in SYSTEM clock Mux
2017-04-28 08:49 AM
Hello Antonio,
Great thanks for your inputs.
CubeMX4.20 has a regression in the clock generation code, that pass through all validation tests.
The behave is exactly what you have reported.
This has been corrected in CubeMXv4.20.1.
I advise you to upgrade to that version, and create a new project.
Kind regards
Sirma