Circular buffer - DMA transfer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Circular buffer - DMA transfer

1,792 Views
user_244572
Contributor II

Hello NXP team,

 

Is there a way to configure DMA for a circular buffer transfer other than the source and destination modulo variable ?
what if the buffer size is not a power of 2 ?

example array size is 10, number of bytes to be transfered is 10 x 2 = 20 bytes ?

 

Thanks,

0 Kudos
Reply
3 Replies

1,773 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

It is indeed the most common configuration.

Double buffering scheme you may also create with using of INT_HALF interrupt.

But you may use links or scatter/gather features to create special configuration just in accordance to your specific needs.

0 Kudos
Reply

1,760 Views
user_244572
Contributor II

Hi David,

Thanks for your answer.

Can you elaborate more on that ?

what if the buffer size changes dynamically as well ?

It would be great if you can provide examples.

My ultimate goal at the end is to read data periodically from a lookup table that changes dynamically in sizes based on input frequency and transfer this data to Emios registers.
We need to read from the table in a circular way.

Thanks,

0 Kudos
Reply

1,718 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport


Here you may see appnote dealing with eDMA (even written for different product line, it is still almost the same DMA module
https://www.nxp.com/docs/en/application-note/AN4765.pdf

Witch Scatter-gather functionality you may achieve even dynamic buffer size, even it may be mor complex use.

In RM, there is a chapter dealing with this in a great detail:
15.5.8 Dynamic programming

 

 

 

0 Kudos
Reply