Showing results for 
Search instead for 
Did you mean: 

DMA not working in CubeMX generated code - order of initialization

Here is a (possibly incomplete) list of threads affected by this CubeMX issue:

This is just in case somebody would like to put up a sticky post with this...


[EDIT] Further development with CubeMX5.5

[EDIT] Problem reappeared 6.3.0

[EDIT] Official method to fix the incorrect order, if project was generated in "incorrect" version of CubeMX:

Charles Miller
Associate III


(CubeMX v6.5)

Why is my USB Virtual Com Port UART (UART3) initialization order entry grayed-out?

(For that matter, why is the DMA init grayed out, and prevented from being moved?)

This prevents a user fix by moving the DMA init to the top!

> Unfortunately, the bug persists in version 6.5

Are you talking about a project started freshly in v6.5? If you migrated projects started in older versions, see last link in the initial post for the official method to fix.

> Why is my USB Virtual Com Port UART (UART3) initialization order entry grayed-out?

I don't know, but you may want to start a thread describing exactly what you've done and what are the symptoms, to allow the Cube crew to reproduce the problem and react adequately.

Generally, if the problems using Cube/CubeMX outweigh benefits from its usage, you may consider using other, traditional methods of programming STM32.


Ahmad M.Nejad
Associate III

Please Please Please activate below icons:pensive_face: 0693W00000LxuxBQAR.png

Hi @Ahmad M.Nejad​ ,

It should be better to submit your request in a new post, with the tag "STM32CubeMX".


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.

Worst is: it was fixed and regressed after about 2 months again...

Happy Birthday! :trophy: :birthday_cake::shortcake: :wrapped_gift:

Be merciful! The CubeMX code is probably a big mess...

Associate II

Hi, I'm new here, could someone please explain why can't I open some issue pages? 
Thank you in advance.



> why can't I open some issue pages?

This forum underwent migration to a different software, and some threads did not get migrated correctly. ST may fix this in the future.

I'm not sure you need to see that particular thread, though; they all were related to the same underlying problem, as discussed further in this thread.



Thank you. Aft
My MCU crushes when DMA filling 50% of the buffer, I'm not familiar with programists vocabularry so it's kinda hard to find similar topics by key words, Could you please help me find simmilar issues or help with sollution of mine? 

link to my one