Skip to main content
waclawek.jan
Super User
December 7, 2019
Solved

DMA not working in CubeMX generated code - order of initialization

  • December 7, 2019
  • 25 replies
  • 14960 views

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

https://community.st.com/s/question/0D50X0000BVnBhASQV/bug-report-dma-and-adc-initialization-order-changed-in-stm32f4-hal-v1241-causing-incorrect-adc-operation

https://community.st.com/s/feed/0D50X0000BZFWRISQ5

https://community.st.com/s/question/0D50X0000BbKaA5SQK/haluarttransmitdma-doesnt

https://community.st.com/s/question/0D50X0000BbMcnpSQC/dma-adc-doesnt-work

https://community.st.com/s/question/0D50X0000BWqGdtSQF/haladcstartdma-init-msp-bug

https://community.st.com/s/question/0D50X0000BcS7tSSQS/stmcubeide-110-cubemx-540-switch-initialization-order

https://community.st.com/s/question/0D50X0000BVnBhASQV/bug-report-dma-and-adc-initialization-order-changed-in-stm32f4-hal-v1241-causing-incorrect-adc-operation

https://community.st.com/s/question/0D50X0000Bfs7MvSQI/stm32f3-adc-with-dma-bug

https://community.st.com/s/question/0D50X0000Bh6PntSQE/bug-mxdmainit-wrongly-placed-by-code-generator-haluarttransmitdma-does-not-work

https://community.st.com/s/question/0D50X0000BiA27LSQS/code-generated-calls-mxdmainit-too-late-after-mxspiinit

https://community.st.com/s/question/0D50X0000BcPXk2SQG/32f746-usart-dma-with-stemwin-not-working

 https://community.st.com/s/question/0D50X0000BmoZgKSQU/simple-uart1-dma-dosent-work-generated-with-latest-stm32cubemx-540-and-stm32f0-1110

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

JW

[EDIT] Further development with CubeMX5.5

https://community.st.com/s/question/0D50X0000Bwjgi7SQA/with-stm32cubemx-55-and-stm32h743-the-mxdmainit-function-is-not-called-at-the-right-time

[EDIT] Problem reappeared 6.3.0 https://community.st.com/s/question/0D53W000011uIPgSAM/adc-dmahandle-is-0

[EDIT] Official method to fix the incorrect order, if project was generated in "incorrect" version of CubeMX: https://community.st.com/s/question/0D53W00001EzCmCSAV/mxdmainit-order-in-the-mainc-file-generated-by-stm32cubemx-how-to-fix

This topic has been closed for replies.
Best answer by waclawek.jan

Here is the official method to fix the incorrect order, if project was generated in "incorrect" version of CubeMX:

https://community.st.com/s/question/0D53W00001EzCmCSAV/mxdmainit-order-in-the-mainc-file-generated-by-stm32cubemx-how-to-fix

JW

25 replies

waclawek.jan
Super User
March 26, 2022

> 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.

JW

Ahmad M.Nejad
Associate II
April 13, 2022

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

Amel NASRI
Technical Moderator
April 14, 2022

Hi @Ahmad M.Nejad​ ,

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

-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.
Louis Cloete
Associate II
July 20, 2022

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

Associate II
March 27, 2024

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

SFediakov_0-1711554003604.png

 

waclawek.jan
Super User
March 27, 2024

> 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.

JW

@Lina_DABASINSKAITE 

Associate II
March 27, 2024

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 https://community.st.com/t5/stm32-mcus-embedded-software/stm32h750-dma-adc-crush/m-p/655289#M46526