AnsweredAssumed Answered

Sharc 21369 DMA Chaining Question

Question asked by dhordern on Jun 17, 2009
Latest reply on Aug 14, 2009 by jeyanthi.jegadeesan

Hey,

I am working with the Sharc 21369. I am using the "Block
Based Talkthru" and making some modifications. However - 
I don't really understand the DMA chaining implementation
in this example. They set up the TCB_Block arrays but they
don't seem to write all the values to the registers?

For example: 

int TCB_Block_A[4] = { 0, sizeof(Block_A), 1, 0};
TCB_Block_A[0] = (int) TCB_Block_C + 3 - OFFSET + PCI ;
TCB_Block_A[3] = (unsigned int) Block_A - OFFSET ;

(for the receive, process, transmit buffers)

then they write the address of the next buff into the CPSPxx register:
*pCPSP0A = (unsigned int) TCB_Block_A - OFFSET + 3 ;

But I don't see where they tell the DMA the size, etc (how does it know when its done??) I thought that the Indexer and Modifier registers would need to be written too aswell??

Also - What is PCI and OFFSET and why are they set at 0x00080000?? And what is the +3 for?? These magic number throw me off..

Cheers...

Outcomes