cancel
Showing results for 
Search instead for 
Did you mean: 

Error MX generation USART/DMA with STM32G0B

tvill.1
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

5 REPLIES 5
Guenael Cadier
ST Employee

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
Associate II

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

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

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.

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.