Can DMA S/G mode become continueous?

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

Can DMA S/G mode become continueous?

342 Views
Guo-
Contributor I

S32k324

When testing the DMA scatter-gather function, I fonnd that the dma cannot move the data in a loop. The DMA will work at the first time and than the CSR_ESG will become 0 and the dma will not loop back to the first element address.(neither the source address and t)

example: I set the scatter-gather mode dma to carry 3 element, I hope the dma will work like 1-2-3-1-2-3-... in my element list(configured in EB and set address using Mcl_SetDmaChannelScatterGatherList ),  but the dma will only carry once.

I also found an similar problem at NXP community(S32K3 DMA - NXP Community)

said 

  • If the user drive DMA S/G by software codes (i.e. triggering DMA with Dma_Ip_SetLogicChannelCommand), it is necessary to clear the CSR_DONE bit (could do it in DMA interrupt callback) to trigger the next transmission

but i reset it to zero the source address reg still not return to the first address (or is that means i need to set other configuration like offset or last address adjustment?)

I would like to know how to set the EB or Mcl_SetDmaChannelScatterGatherList configuration to implement this function or the scatter/gather only work once then the dma will set the CSR_ESG 0 and become in normal mode?

BR 

Guo

0 Kudos
1 Reply

322 Views
nxf78987
NXP Employee
NXP Employee

Hi Guo-,

If you need to perform DMA cyclically, you can connect the S/G list, that is, element0 is linked to element1; element1 is linked to element2 and element2 is linked to element0 to form a ring.

nxf78987_0-1679386162780.png

 

Best regards,

Dan

0 Kudos