Circular buffer - DMA transfer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Circular buffer - DMA transfer

1,795件の閲覧回数
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 件の賞賛
返信
3 返答(返信)

1,776件の閲覧回数
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 件の賞賛
返信

1,763件の閲覧回数
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 件の賞賛
返信

1,721件の閲覧回数
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 件の賞賛
返信