cancel
Showing results for 
Search instead for 
Did you mean: 

Cube 4.20 bug - Clock initialization

AndreaC
Associate III
Posted on March 16, 2017 at 10:54

I found a bug in the new Cube Version.

At line 1 internal oscillator is enabled although it is not used, in fact it is not actived:

RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE
|RCC_OSCILLATORTYPE_LSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
 Error_Handler();
}�?�?�?�?�?�?�?�?�?

This brings HAL_RCC_OscConfig() to fail (timeout).

Thanks and BR,

Andrea

#cube #clock #bug
6 REPLIES 6
Imen.D
ST Employee
Posted on March 16, 2017 at 11:03

Hello Andrea,

I confirm this bug, this is already reported internally to our CubeMx team and will take care to fix this issue.

Sorry for such inconvenience.

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
yang zhiyong
Associate
Posted on March 27, 2017 at 07:37

bug,I am。

Posted on April 04, 2017 at 16:25

I confirm the bug. Replicated using STM32F4-discovery board. When configure HSE, this 'RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE;' bug will occure.

Posted on April 04, 2017 at 16:48

Seem to be several people with similar/familiar issues with current release of CubeMX across platforms.

Please do more regression testing before releasing broken code to the ecosystem, the Adobe/Microsoft model for releasing streams of differently broken, but never fully fixed code, is really NOT appropriate for embedded systems where installed lifespan may exceed 10 years.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Imen.D
ST Employee
Posted on April 05, 2017 at 17:51

Hello,

The RCC config issue is fixed in the new patch CubeMx v4.20.1

So, please download and update the new version to resolve this issue.

PS: if you are using an old .ioc project, you should first EDIT the .ioc file and REMOVE the RCC.OscillatorType that you don't need

E.g: remove this line

RCC.OscillatorTypeHSI=RCC_OSCILLATORTYPE_HSI

Then re-generate the project, this will resolve your problem.

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on April 06, 2017 at 15:34

Ok, thank you Imen.

BR,

Andrea