Skip to main content
AndreaC
Associate III
March 16, 2017
Question

Cube 4.20 bug - Clock initialization

  • March 16, 2017
  • 6 replies
  • 1412 views
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
This topic has been closed for replies.

6 replies

ST Technical Moderator
March 16, 2017
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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
yang zhiyong
Visitor II
March 27, 2017
Posted on March 27, 2017 at 07:37

bug,I am。

Jan Slavot�nek
Associate III
April 4, 2017
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.

Tesla DeLorean
Guru
April 4, 2017
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
ST Technical Moderator
April 5, 2017
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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
AndreaC
AndreaCAuthor
Associate III
April 6, 2017
Posted on April 06, 2017 at 15:34

Ok, thank you Imen.

BR,

Andrea