Hi,
I have developed a codec for the DM3730 that relies on ACPY3 interface to copy a local buffer to the external memory. The local buffer is a line buffer (in 1D format), but the destination buffer is a 2D image buffer, so I am using the 1D2D copy property of my IDMA3_Obj local variable.
The copy works fine for most of the image, but in some cases parts of the block to be copied are not copied at all. It seems like the copy function misses some parts of the element to be copied (part of the line of the destination 2D matrix). Is there any reason why the copy function does not work only in certain cases ? How can I make sure that the copy will be performed ?
Below you can see the copy function I am using.
/* Use the ACPY3 interface to do a DMA */
void TRUE3DDEC_OSTENDO_ACPY3_1D2D_Copy(IDMA3_Handle hIDMA3,Uns Dst, Uns Src, Uns NumberOfBytesPerLine, Uns NumberOfLines, Uns Stride)
{
ACPY3_Params params;
unsigned char* pSrc = (unsigned char*)Src;
unsigned char* pDst = (unsigned char*)Dst;
/* Configure the logical channel */
params.transferType = ACPY3_1D2D; //1D to 2D transfer
params.srcAddr = (void *)pSrc;
params.dstAddr = (void *)pDst;
params.elementSize = NumberOfBytesPerLine;
params.numElements = NumberOfLines;
params.srcElementIndex = NumberOfBytesPerLine;
params.dstElementIndex = Stride;
params.numFrames = 1;
params.srcFrameIndex = 0;
params.dstFrameIndex = 0;
params.waitId = 1;
/* Configure logical dma channel */
ACPY3_configure(hIDMA3, ¶ms, 0);
/* Use DMA to copy data */
ACPY3_start(hIDMA3);
/* wait for transfer to finish */
ACPY3_wait(hIDMA3);
}
I would greatly appreciate any help with this issue.
Thanks,
Danillo