I am planning to copy data from DDR2 to DDR2 using EDMA.
But find no example in the starterware.
Can anyone help me ?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am planning to copy data from DDR2 to DDR2 using EDMA.
But find no example in the starterware.
Can anyone help me ?
Hello!
I have drafted up a basic example of the EDMA which simply transfers one portion of memory (an array of irrelevant values) to another arbitrary location in memory. The code should be straight forward but feel free to ask me any questions. Note the last function defined is where 'Param' is configured - that's very important when considering the EDMA. It is attached in this post as a C file and was tested with a BeagleBone white platform.
-Colin
Thanks a lot !
When the transfer size less than 64K bytes, it works perfectly!
But when the size larger than 64K bytes, it goes into err interrupt.
The following is what I config .
-------------------------------------------------------------------------------------------------
/* Setting the Transfer Complete Interrupt Enable(INTEN). */
paramSet[0].opt = 1<<EDMA3CC_OPT_TCINTEN_SHIFT;
/* Setting the Transfer Complete Code(TCC). */
paramSet[0].opt |= ((tccNum << EDMA3CC_OPT_TCC_SHIFT) & EDMA3CC_OPT_TCC);
if ( tr_size < 64*1024 )
{
paramSet[0].aCnt = (unsigned short)tr_size; /* A = length of array */
paramSet[0].bCnt = (unsigned short)1; /* Number of arrays per frame */
paramSet[0].cCnt = (unsigned short)1; /* Number of frames */
}
else if ( tr_size < 64*1024*64*1024 )
{
/* Setting the AB-synchronized. */
paramSet[0].opt |= 1<<EDMA3CC_OPT_SYNCDIM_SHIFT;
paramSet[0].aCnt = (unsigned short)65535; /* A = length of array */
paramSet[0].bCnt = (unsigned short)(tr_size/(64*1024)-1); /* Number of arrays per frame */
paramSet[0].cCnt = (unsigned short)1; /* Number of frames */
}
/* Number of bytes between start of one line to the start of the next */
paramSet[0].srcBIdx = (signed short)1;
paramSet[0].destBIdx = (signed short)1;
/* N/A */
paramSet[0].srcCIdx = (signed short)0;
paramSet[0].destCIdx = (signed short)0;
/* Not linking so set to 0xFFFF */
paramSet[0].linkAddr = (unsigned short)0xFFFF;
paramSet[0].bCntReload = (unsigned short)0;
paramSet[0].rsvd = 0;
-------------------------------------------------------------------------------------
Can you find the reason?