cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5 GPDMA cyclic transfer without LLI

Eiffel
Associate III

Hi all,

 

in RM0456 is plenty of examples with using LLI but only one without it. And even that contain a block diagram that does not explain anything. Also AN5593 does not mention cyclic transfer. So, here i am.

Eiffel_0-1751715731895.png

Does this diagram means, that if the LLR register is null, the transfer will automatically restarted and thus used in cyclic transfer without LLI? 

Really guys, review the documentations befor releasing them.

5 REPLIES 5
Sarra.S
ST Employee

Hello @Eiffel

The block diagram you referenced shows the direct programming flow, which ends after one transfer unless re-enabled by software by configuring the GPDMA_CxLLR register 

Also, cyclic (circular) transfer mode is available and does not require LLI. It is enabled via the CIRC bit.

Hope that helps!

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.

Hi @Sarra.S ST Employee.

Many thanks for your message. Could you please tell me in which register CIRC bit is located? Your reference manual did not hear about that bit.

Also your colleagues from support:

Eiffel_0-1754508619371.png

Eiffel_1-1754508712866.png

What happens with ST? Even ST employees dont know what to do.

Hello @Eiffel

The implementation of circular mode varies depending on the DMA controller. For the STM32U5 series, there is no dedicated CIRC bit for hardware circular mode management, as detailed in the product reference manual.

Instead, circular buffering is handled through linked-list programming, as explained in Section 17.4.13 "GPDMA circular buffering with linked-list programming" of RM0456 Rev 6.

To achieve circular mode, you need to create a linked list that resets the memory source (or destination) start address for memory-to-peripheral (or peripheral-to-memory) transfers. The GPDMA automatically reloads the initially programmed block size (GPDMA_CxBR1.BNDT[15:0]) upon completion of each block transfer.

Additionally, there is a helpful workshop available on the STMicroelectronics YouTube channel that demonstrates how to configure DMA in circular mode using STM32CubeMX. You can watch it here:
https://www.youtube.com/watch?v=jKOhRfb3gvk&t=438s

This video provides a great starting point to understand the implementation process.

 

kind regards

Hello another ST employee. 

Thanks for another opinion. Current state is 2:1 for statement, that gpdma does not support circullar mode. Instead of that, there is a way to "hack" it, because you screwed it. That means another arbitration for loading configuration for gpdma channel, while there is just one gpdma controller. Really "impressive" job. 

About that "tutorial", did you watch that? Do you understand principle of gpdma from that videos? That is just a tutorial about how to click and where. Nothing about principles of gpdma.

Hello @Eiffel

 

The architectural choice was to implement the circular transfer using a linked list, as this approach efficiently handles repeating a sequence of nodes within the circular transfer.

Regarding the tutorial, it does not focus on explaining the overall DMA workflow but rather demonstrates how to achieve circular transfer through linked lists. STM32CubeMx serves as a configuration tool that assists in creating the necessary nodes for such circular transfers.

The generated code can be reviewed, customized, and adapted to suit the specific requirements of your application. It provides an excellent foundation for generating GPDMA initialization code and gaining a clear understanding of the GPDMA circular mode.

Kind regards