Hi all,
I'd like to create my own xDAIS module which uses DMA. I'm using 'fastcpy' example (provided by TI) for getting in touch with DMAN3 features and figuring out how to implement DMA access in an algorithm. This example is supposed to copy one region in the external memory to one region in the on-chip RAM and after that copy this region back to the external memory.
I compiled and debugged the project in CCS 4.2.3 and it works fine. What I wanted to do now is checking if the algorithm really copies the data to the on-chip memory. In FCPY_TI_alloc(), two working buffers are declared in the following way:
/* Request memory for working buffer 1 */ memTab[WORKBUF1].size = (params->srcLineLen) * (params->srcNumLines) * sizeof (Char);
memTab[WORKBUF1].alignment = ALIGN_FOR_CACHE; memTab[WORKBUF1].space = IALG_DARAM0; memTab[WORKBUF1].attrs = IALG_SCRATCH; /* Request memory for working buffer 2 */ memTab[WORKBUF2].size = (params->srcLineLen) * (params->srcNumLines) * sizeof (Char);
memTab[WORKBUF2].alignment = ALIGN_FOR_CACHE; memTab[WORKBUF2].space = IALG_DARAM0; memTab[WORKBUF2].attrs = IALG_SCRATCH; According to what I know, setting the variable memTab.space to IALG_DARAM0 makes the client application to allocate this buffer in the internal memory. However, I am not sure about this to be true. I created a new CCS project using all the files used in 'fastcopy' example and tried to debug it to check the values of the pointers to worBuf1 and workBuf2. I did it this way because in the original project, 'fcpy_ti' is a library and I could not debug the execution of the function doCopy. I was surprised when I found that the values of the pointers worBuf1 and workBuf2 a region in the external memory (DDR2). In theory, they arre correctly allocated by DMAN3_grantDmaChannels() right? Is there any reason why this could be happening? Thanks a lot for your help