cancel
Showing results for 
Search instead for 
Did you mean: 

[bug report] STM32CubeMX - RCC configuration for STM32F427

Artur Trybula
Associate
Posted on March 31, 2017 at 12:37

Hi Everybody

Developing code for STM32F427 I decided to use CubeMX. It was not the first time when I found the tool useful to start the project but the first time when I noticed a problem with the output configuration files, especially with RCC configuration.

Please find the following code into your main.c file:

  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;

  RCC_OscInitStruct.HSEState = RCC_HSE_ON;

  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;

  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;

  RCC_OscInitStruct.PLL.PLLM = 8;

  RCC_OscInitStruct.PLL.PLLN = 180;

  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;

  RCC_OscInitStruct.PLL.PLLQ = 3;

  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)

  {

    Error_Handler();

  }

The function HAL_RCC_OscConfig returns with HAL_ERROR.

0690X00000606fTQAQ.png

To run the program properly I had to remove RCC_OSCILLATORTYPE_HSI from the first line of the code above.That was the only modification. No more changes were made.

IDE: TrueSTUDIO

MCU and firmware package:

0690X00000606djQAA.png

Is this a bug, or I did something wrong?

Artur

5 REPLIES 5
Khouloud GARSI
Lead II
Posted on March 31, 2017 at 12:55

Hi

trybula.artur

,

This is a confirmed bug; It will be fixed througha patch which will be delivered soon.

Sorry for any inconvenience this may have caused.

Khouloud.

Khouloud GARSI
Lead II
Posted on April 05, 2017 at 16:55

Hi

trybula.artur

‌,

I would inform you that a new patch

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fdevelopment-tools%2Fsoftware-development-tools%2Fstm32-software-development-tools%2Fstm32-configurators-and-code-generators%2Fstm32cubemx.html

is now available on ST website. The issue is fixed.

Khouloud.

Posted on April 06, 2017 at 10:04

Hi

garsi.khouloud

Thank you for the info.

Artur

Posted on April 21, 2017 at 15:16

Hello!

Ok, this is now working. I got the same problem on F769NI after needing to try configuration with HSI.

The come back to HSE only was impossible and lead to fail during execution.

It wasn't easy to recover solution in updated CubeMX (4.20.1). Needed to reconfigure to HSI again an go back to HSE.

With success this time.

Thank you for the correction.

XoXo

Posted on April 21, 2017 at 17:10

Hi

frans.electro

‌,

You are welcome and sorry for any inconvenience this may have caused.

Khouloud.