cancel
Showing results for 
Search instead for 
Did you mean: 

The STM32G484CETx initialization code generated by STM32cubeMX has a bug

Gzhx.1
Associate

I do n’t know why MX_DMA_Init () is behind other peripheral initialization functions, so all DMA channel initialization fails.

stm32cubemx version: 5.6.0

6 REPLIES 6

Indeed, if it is a project created with an older version of CubeMX and regenerated with current version, the problem is still there.

@Gzhx.1​ , do you confirm it is the case?

@Khouloud ZEMMELI​ , do you have some ore details to add please?

-Amel

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.

Yes @Amel NASRI​ , normally the bug is fixed in the 5.6.1 MX version

Best Regards,

Khouloud

Morkness
Associate

Still broken.

Last week I downloaded and installed

STM32CubeIDE

Version: 1.7.0

Build: 10852_20210715_0634 (UTC)

which seems to contain

STM32CubeMX - STM32 Device Configuration Tool

Version: 6.3.0-RC5

Build: 20210714-1111 (UTC)

This is the autogenerated code for the Nucleo-F303ZE after I enable ADC and play with sending strings over USART. Later I enabled DMA to figure out how it works to transmit on USART using DMA. (Not sure if the order is important, but just to tell you how I got to this point)

/* USER CODE END SysInit */
 
  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_RTC_Init();
  MX_USART3_UART_Init();
  MX_USB_PCD_Init();
  MX_DMA_Init();
  MX_ADC1_Init();
  /* USER CODE BEGIN 2 */

I noticed in the debugger that the CCR register didn't seem to accept the value written to it in the MX_DMA_Init(), and I couldn't change it from inside the debugger either.

My workaround was to place a call to MX_DMA_Init() in the User Code just above, but it took me basically an entire day of headscratching before a colleague found this thread and showed it to me.

Hi @Peter M_2örck​ ,

That looks to be a regression on latest STM32CubeMX version (@Khouloud ZEMMELI​ can confirm this).

A possible workaround is to set a ranking for generated functions calls. This is possible from Project Manager >> Advanced Settings.

-Amel

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.

Hello @Peter M_2örck​ ,

Yes, I confirm the regression..

It's now under analysis and it will be fixed, we're sorry for any inconvenient that may have caused.

Khouloud