Skip to main content
Gzhx.1
Visitor II
April 8, 2020
Question

The STM32G484CETx initialization code generated by STM32cubeMX has a bug

  • April 8, 2020
  • 2 replies
  • 1288 views

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

This topic has been closed for replies.

2 replies

Amel NASRI
ST Technical Moderator
April 9, 2020

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 "Best Answer" on the reply which solved your issue or answered your question.
Khouloud ZEMMELI
ST Employee
April 10, 2020

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

Best Regards,

Khouloud

Morkness
Visitor II
August 23, 2021

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.

Amel NASRI
ST Technical Moderator
August 24, 2021

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 "Best Answer" on the reply which solved your issue or answered your question.