Skip to main content
Artur Trybula
Associate
March 31, 2017
Question

[bug report] STM32CubeMX - RCC configuration for STM32F427

  • March 31, 2017
  • 2 replies
  • 1082 views
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

    This topic has been closed for replies.

    2 replies

    Khouloud GARSI
    ST Employee
    March 31, 2017
    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
    ST Employee
    April 5, 2017
    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.

    Artur Trybula
    Associate
    April 6, 2017
    Posted on April 06, 2017 at 10:04

    Hi

    garsi.khouloud

    Thank you for the info.

    Artur