Hello,everyone!
I'm using C6455&CSL under SYS/BIOS to perform a simple data transfer,but now I find an interesting phenomenon:
When I choose Channel 0(HPI/PCI-to-DSPEvent),It works OK.
But when I change the channel such as the Channel 3, I can't trigger the EDMA manually. I find the EER and ESR is correct, the corresponding bit is already set 1,but the EDMA just don't start a transfer.
I've checked my param set mapped to the channel, but it seems all right.
Can anybody helps me?Thank you very much.
Part of my code :
status = CSL_edma3Init(&context);
/* Edma module open */
hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
/* Edma module setup */
dmahwSetup.paramNum = 0;
dmahwSetup.que = CSL_EDMA3_QUE_0;
hwSetup.dmaChaSetup = &dmahwSetup;
hwSetup.qdmaChaSetup = NULL;
status = CSL_edma3HwSetup(hModule,&hwSetup);
/* Setup the DRAE masks
* DRAE enable(Bits 0-15) for the shadow region 1.
*/
regionAccess.region = CSL_EDMA3_REGION_1 ;
regionAccess.drae = 0xFFFF ;
regionAccess.draeh = 0x0000 ;
status = CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_DMAREGION_ENABLE, \
®ionAccess);
/* Channel open */
chAttr.regionNum = CSL_EDMA3_REGION_1;
chAttr.chaNum = CSL_EDMA3_CHA_3;
hChannel = CSL_edma3ChannelOpen(&chObj, CSL_EDMA3, &chAttr, &status);
/* Get the parameter handle */
hParamBasic = CSL_edma3GetParamHandle(hChannel,0,&status);
/* Edma parameter entry Setup */
myParamSetup.option = CSL_EDMA3_OPT_MAKE(CSL_EDMA3_ITCCH_DIS, \
CSL_EDMA3_TCCH_DIS, \
CSL_EDMA3_ITCINT_DIS, \
CSL_EDMA3_TCINT_EN,\
1,CSL_EDMA3_TCC_NORMAL,\
CSL_EDMA3_FIFOWIDTH_NONE, \
CSL_EDMA3_STATIC_DIS, \
CSL_EDMA3_SYNC_A, \
CSL_EDMA3_ADDRMODE_INCR, \
CSL_EDMA3_ADDRMODE_INCR);
myParamSetup.srcAddr = (Uint32)SrcBuf;
myParamSetup.aCntbCnt = CSL_EDMA3_CNT_MAKE(16,1);
myParamSetup.dstAddr = (Uint32)Shared_BufA;
myParamSetup.srcDstBidx = CSL_EDMA3_BIDX_MAKE(0,0);
myParamSetup.linkBcntrld = CSL_EDMA3_LINKBCNTRLD_MAKE (CSL_EDMA3_LINK_NULL,
1);
myParamSetup.srcDstCidx = CSL_EDMA3_CIDX_MAKE(0,0);
myParamSetup.cCnt = 1;
status = CSL_edma3ParamSetup(hParamBasic,&myParamSetup);
CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_CLEAR,NULL);
CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_ENABLE,NULL);
/* Hook up the EDMA event with an completion code function handler */
EdmaEventHook(1, isr_src_A);
/* Enable interrupts */
regionIntr.region = CSL_EDMA3_REGION_1 ;
regionIntr.intr = 0x2 ;
regionIntr.intrh = 0x0 ;
status = CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_INTR_ENABLE,®ionIntr);
/* Manually trigger the channel */
status = CSL_edma3HwChannelControl(hChannel,CSL_EDMA3_CMD_CHANNEL_SET,NULL);