How to use DMA Scatter/Gather?

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

How to use DMA Scatter/Gather?

Jump to solution
1,904 Views
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!

Labels (1)
1 Solution
1,374 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

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

This is mandatory.

Peter

View solution in original post

5 Replies
1,374 Views
enes
Contributor II

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

0 Kudos
1,374 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

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

PEter

1,375 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

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

This is mandatory.

Peter

1,374 Views
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 Kudos
1,374 Views
liujinhang
Contributor III

hi, Peter 

I did it ,thanks for your reply.

Best Wishes

0 Kudos