Hi,
I'm working on C6472 DSP using DSP bios v5 and CCS v4.2
I want to use EDMA to copy a buffer from external memoy DDR to internal memory LL2RAM.
It's the first time that I work on EDMA3. I tried to the example exists in csl_c6472->EDMA->edma_ping_pong_xfer_gbl_reg ...this example is created with CCSv3
So I tried to use the source files and I created my own project on CCSv4 and I add the DSP_bios_configuration.
in this example the buffers are declared globally:
Uint8 srcBuff1[512];
Uint8 srcBuff2[512];
Uint8 dstBuff1[512];
Uint8 dstBuff2[512];
As I want to transfert data from external to internal memory I created two heaps : one in DDR and one in LL2RAM and I replaced the declaration of the buffers by this code in my project:
unsigned char * srcBuff1 = (unsigned char*)MEM_calloc(DDR_Heap, sizeof(unsigned char)*buffer_size, 8);
unsigned char * srcBuff2 = (unsigned char*)MEM_calloc(DDR_Heap, sizeof(unsigned char)*buffer_size, 8);
unsigned char * dstBuff1 = (unsigned char*)MEM_calloc(LL2_Heap, sizeof(unsigned char)*buffer_size, 8);
unsigned char * dstBuff2 = (unsigned char*)MEM_calloc(LL2_Heap, sizeof(unsigned char)*buffer_size, 8);
what happen is when I allocated the srcBuff and the dstBuff both in the DDR_Heap , the transfert was passed but when I allocated the srcBuff int DDR_Heap and the dstBuff in the LL2_Heap( internal memory) the transfert was failed. So could someone tell me what's the problem...
Could this problem is related with the EDMA region or the EDMA3 Channel Synchronization Events?
/* Module setup */
dmahwSetup[CSL_EDMA3_CHA_TEVTLO6].paramNum = 0;
dmahwSetup[CSL_EDMA3_CHA_TEVTLO6].que = CSL_EDMA3_QUE_0;
hwSetup.dmaChaSetup = &dmahwSetup[0];
hwSetup.qdmaChaSetup = NULL;
status = CSL_edma3HwSetup(hModule,&hwSetup);
if (status != CSL_SOK) {
printf ("Hardware setup failed\n");
CSL_edma3Close (hModule);
return;
}
/* Channel open */
chAttr.regionNum = CSL_EDMA3_REGION_GLOBAL;
chAttr.chaNum = CSL_EDMA3_CHA_TEVTLO6;
/*********************************/
if there is a relation between this problem and these parameters, so could you please give me the appropriate parameters to transfert a buffer from external memory DDR to internal memory LL2RAM.
Best regards
David