Skip to main content
tvill.1
Associate II
July 4, 2022
Solved

Error MX generation USART/DMA with STM32G0B

  • July 4, 2022
  • 2 replies
  • 1176 views

Hello community,

Warning, when gerating code for STM32G0B with FW_1.5.0, DMA init function is called after USART2 init function.

So the DMA doesn't works !!

The only way to resolve this i have found is to cut/paste function in the good order ^^

Report the bug if you know how to do that.

Have à good day,

Thomas.

This topic has been closed for replies.
Best answer by Sara BEN HADJ YAHYA

Hello @tvill.1​ ,

The issue is fixed in v6.6.0, only H7 devices still have it. Anyways when migrating a project with a wrong order it doesn't get fixed automatically, you have to correct it before project migration, even if you didn't you can apply the workaround (before or after project migration) proposed in this thread MX_DMA_Init order in the main.c file generated by STM32CubeMX, How to fix?

I hope this helps !

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

2 replies

Guenael Cadier
ST Employee
July 4, 2022

Dear Thomas,

What CubeMX version are you using ?

This error was already reported, and I understood it should be solved now.

Regards

Guenael

tvill.1
tvill.1Author
Associate II
July 4, 2022

Hello,

It is a good news for the report, thanks.

I use CubeMX inside CubeIDE. My version is 6.5.0-RC4 (in about windows)

Regards

Thomas

Guenael Cadier
ST Employee
July 4, 2022

I checked using latest STM32CubeMx version 6.6.0, and here the basic code generated by CubeMx :

 /* Initialize all configured peripherals */
 MX_GPIO_Init();
 MX_DMA_Init();
 MX_USART2_UART_Init();

So DMA initialisation is now executed prior USART init.

So It should work now ;)

Guenael

tvill.1
tvill.1Author
Associate II
July 5, 2022

Hello,

I'm sorry but that doesn't works for me, i have updated cubeIDE to 1.10.0 to have CubeMX 6.6.0 and CubeFW_1.6.0, forced by the new version :( ...

0693W00000QKSDCQA5.png 

0693W00000QKSCiQAP.png0693W00000QKSCEQA5.png0693W00000QKSDqQAP.pngAfter generation, i still have the error, USART is initialized before DMA !!

Thanks,

Thomas.