cancel
Showing results for 
Search instead for 
Did you mean: 

I found a bug in STMCubeMX. How do I report it and get it fixed.

AWolf.8
Associate III

We teach using the STM32L476G Discovery kit Board. We have been using STMCubeMX 5.6.0 and Libraries 15.1. We want to migrate to current versions (6.6.0 and 17.2) but all of out programs that use the LCD controller fail. After some detective work, the bug appears between versions 6.2 ands 6.3. There is a file called stm32l4xx_hal_msp.c that is generated and some new code has been added:

/** Initializes the peripherals clock
  */
    PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_RTC;
    if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
    {
      Error_Handler();
    }

It turns out that this code was moved from main.c to stm32l4xx_hal_msp.c and in moving it one line of code was dropped.

		PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;

Without this line of code, the LCD/RTC clock selection is none. That's why nothing works.

There is a workaround since there is a user area where this code can be placed. But - it is still a bug.

How do I report this kind of bug and either get it addressed or get a workaround?

1 ACCEPTED SOLUTION

Accepted Solutions
Semer CHERNI
ST Employee

Hello @AWolf.8​ 

First le me thank you for having reported.

The issue is reproduced from my side.

Also I tested it with STM32CubeMX 5.6 and it work fine.

Meanwhile using the 6.6.0 of CubeMx you can either add this code before the RTC peripheral clock initialization in the stm32l4xx_hal_msp.c file :

  /* USER CODE BEGIN LCD_MspInit 0 */
    PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
  /* USER CODE END LCD_MspInit 0 */

or enable the RTC clock source from CubeMx

0693W00000Nt9KbQAJ.png 

With this being said, this problem is raised internally to be reviewed. I'll keep you posted with the updates.

Internal ticket number: 131201 (This is an internal tracking number and is not accessible or usable by customers).

Thanks for your contribution.

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Semer CHERNI
ST Employee

Hello @AWolf.8​ 

First le me thank you for having reported.

The issue is reproduced from my side.

Also I tested it with STM32CubeMX 5.6 and it work fine.

Meanwhile using the 6.6.0 of CubeMx you can either add this code before the RTC peripheral clock initialization in the stm32l4xx_hal_msp.c file :

  /* USER CODE BEGIN LCD_MspInit 0 */
    PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
  /* USER CODE END LCD_MspInit 0 */

or enable the RTC clock source from CubeMx

0693W00000Nt9KbQAJ.png 

With this being said, this problem is raised internally to be reviewed. I'll keep you posted with the updates.

Internal ticket number: 131201 (This is an internal tracking number and is not accessible or usable by customers).

Thanks for your contribution.

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you. I have tried both work-arounds and they both work.

Hello @AWolf.8​ 

The issue is fixed with the STM32CubeMx 6.7.0 available under this link.

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.