cancel
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:

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

39 REPLIES 39
Amel NASRI
ST Employee

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.

Thanks, Amel.

Jan

Amel NASRI
ST Employee

Adding: https://community.st.com/s/question/0D50X0000BqC9lBSQS/cubemx-usart1-with-dma-ll-driver-inits-dma-streams-before-enabling-dma-clk

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
ST Employee

Adding: https://community.st.com/s/question/0D50X0000Bmod5ESQQ/bug-report-haluarttransmitdma-doesnt-transmit-a-character

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
ST Employee

Adding: https://community.st.com/s/question/0D50X0000BmoycOSQQ/stm32f030-hal-problem-with-uart-dma-receive-memory-increment-not-set-properly-with-workaround

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
ST Employee

Adding https://community.st.com/s/question/0D50X0000BtZ9hnSQC/how-to-get-uart-dma-interrupt-to-work

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.

Imen.D
ST Employee

https://community.st.com/s/question/0D50X0000BxyfGSSQY/bug-report-cubemx-generated-adc-with-dma-code-broken-wrong-init-order

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen