How to use DMA Scatter/Gather?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to use DMA Scatter/Gather?

跳至解决方案
4,611 次查看
liujinhang
Contributor III

Dear All,

            I want to use  DMA Scatter/Gather function of MPC5444P,but some experiment phenomenon Confused me,the following is my DMA configurations information:

      177821_177821.png123.png

177822_177822.png321.png

Problem phenomenon:when the major loop completed,the value of DMA_0.TCD[18].DLASTSGA.B.DLASTSGA was added to the DMA_0.TCD[18].DADDR.B.DADDR rather than  the contents of TCD_SG1[]  is loaded into the TCD register, then a DMA Destination Bus Error occurred.

 Can anyone tell me how can i do to make the contents of TCD_SG1[] be loaded into the TCD register ?

here is the reference:http://cache.nxp.com/assets/documents/data/en/application-notes/AN4765.pdf?fromsite=zh-Hans 

thanks very much!

标签 (1)
1 解答
4,081 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hi,

Do you have you scatter/gather descriptor 32bytes aligned in memory?

This is mandatory.

Peter

在原帖中查看解决方案

5 回复数
4,081 次查看
enes
Contributor II

Hi, we have same problem with scatter-gather method. Can u give more details about how to solve this problem. 

0 项奖励
回复
4,081 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hi,

Just align your TCD in memory for 32bytes. Otherwise DMA will load incomplete or incorrect TCD.

PEter

4,082 次查看
petervlna
NXP TechSupport
NXP TechSupport

Hi,

Do you have you scatter/gather descriptor 32bytes aligned in memory?

This is mandatory.

Peter

4,081 次查看
liujinhang
Contributor III

It maybe the problem,The addresses of TCD_SG0[] and TCD_SG1[] are really not 32bytes aligned in memory . I misunderstood  the meaning of "0-modulo-32-byte",  thank you for your reminding!

but I do not know how to make the scatter/gather descriptor 32bytes aligned  in memory. Can you give me an example?

 thanks very much!

0 项奖励
回复
4,081 次查看
liujinhang
Contributor III

hi, Peter 

I did it ,thanks for your reply.

Best Wishes

0 项奖励
回复