cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX generated DMA code

jminack
Associate II

Hi,

I'm using V6.15.0 of CubeMX with STM32U5 to generate DMA code. When I use the following configuration, it appears to generate incorrect code?

jminack_0-1755478887628.png

I've noticed the following:

1) It placed the Node_GPDMA1_Channel1 structure on the stack:

jminack_1-1755479106077.png

This doesn't seem right, and I would note that when memory to memory DMA is selected, it allocates this (correctly) statically.

2) It sets the source increment mode to LL_DMA_SRC_FIXED:

jminack_2-1755479311613.png

 

This again doesn't seem right. When transferring from memory to peripheral, the source increment mode should be LL_DMA_SRC_INCREMENT.

 

3) This code is confusing and inconsistent:

 

jminack_3-1755480360402.png

When generating memory to memory code, the LL_DMA_SetLinkedListBaseAddr call is placed inside the comments. When generating peripheral to memory code, it is placed outside of the comments.

 

Regards

 

John

 

1 REPLY 1
Ghofrane GSOURI
ST Employee

Hello @jminack 

I'm currently investigating this.

I will get back to you asap.

THX
GHofrane

 

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.