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

Amel NASRI
Technical Moderator
December 11, 2019

OK Jan, your post is pinned on the top of STM32CubeMX questions, waiting for next release of the tool where a fix will be available :)

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.
waclawek.jan
Super User
December 11, 2019

Thanks, Amel.

Jan

Amel NASRI
Technical Moderator
December 16, 2019
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.
Amel NASRI
Technical Moderator
December 18, 2019
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.
Amel NASRI
Technical Moderator
December 19, 2019
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.
Amel NASRI
Technical Moderator
December 31, 2019
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.
Technical Moderator
January 13, 2020
"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
Louis Cloete work
Associate III
April 2, 2020

Any place where I can see if this is fixed in the newest CubeMX?

Amel NASRI
Technical Moderator
April 3, 2020

Hi @Community member​ ,

Did you downloaded latest CubeMX version (5.6)? The issue is already fixed.

-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 work
Associate III
April 3, 2020

Thanks for the reply. I did not download it because of data usage concerns. I'll download it now that I know it is fixed.

For future reference, do you have a place where we can see the status of publicly-reported bugs? It would be very useful.