Hi All,
I'm working on C6678 and CCS v5.1.1.
I have a buffer gRxBuffer on DDR3. I want to copy a small portion of this to a local buffer tempin. My present code is like the following:
for(m = 511; m >= 256; m--)
{
tempin[m] = *(gRxBuffer + (p * offset1) + (i * row_width)+ m) ; // p and i are loop variables. offset1 and row_width have const values.
}
I want to replace this with DMA. I have set the PARAM set as
/* Setup the parameter entry parameters (READ buffer) */
myParamSetup.option = CSL_EDMA3_OPT_MAKE(CSL_EDMA3_ITCCH_DIS, \
CSL_EDMA3_TCCH_DIS, \
CSL_EDMA3_ITCINT_DIS, \
CSL_EDMA3_TCINT_EN, \
0, CSL_EDMA3_TCC_NORMAL,\
CSL_EDMA3_FIFOWIDTH_NONE, \
CSL_EDMA3_STATIC_EN, \
CSL_EDMA3_SYNC_A, \
CSL_EDMA3_ADDRMODE_INCR, \
CSL_EDMA3_ADDRMODE_INCR );
myParamSetup.srcAddr = (Uint32) (gRxBuffer + (p * offset1) + (i * row_width) + 256);
myParamSetup.aCntbCnt = CSL_EDMA3_CNT_MAKE(256 * sizeof (float), 1);
myParamSetup.dstAddr = (Uint32)tempin;
myParamSetup.srcDstBidx = CSL_EDMA3_BIDX_MAKE(0,256 * sizeof (float));
myParamSetup.linkBcntrld= CSL_EDMA3_LINKBCNTRLD_MAKE(CSL_EDMA3_LINK_NULL,0);
myParamSetup.srcDstCidx = CSL_EDMA3_CIDX_MAKE(0,0);
myParamSetup.cCnt = 1;
I am pretty sure that my PARAM values are wrong some where.. Please guide me correct my PARAM values for the transfer....
if (CSL_edma3ParamSetup(hParamBufRead,&myParamSetup) != CSL_SOK)
{
printf ("Error: EDMA Parameter Entry Setup failed\n");
}
/* Interrupt enable (Bits 0-1) for the global region interrupts */
regionIntr.region = CSL_EDMA3_REGION_GLOBAL;
regionIntr.intr = 0x3;
regionIntr.intrh = 0x0000;
CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_INTR_ENABLE,®ionIntr);
/* Trigger channel */
CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_SET,NULL);
regionIntr.region = CSL_EDMA3_REGION_GLOBAL;
regionIntr.intr = 0;
regionIntr.intrh = 0;
/* Poll on IPR bit 0 */
do {
CSL_edma3GetHwStatus(hModule,CSL_EDMA3_QUERY_INTRPEND,®ionIntr);
} while (!(regionIntr.intr & 0x1));
The triggering, polling and all is done without any exceptions... But the transfer is not happening...
Regards,
Sohal