This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工程师好,我现在利用调用例子函数的EDMA搬移就能搬移成功,我把接口去掉直接调用内部函数搬移一直没更新,提示EDMA3_DRV_enableTransfer Failed, error code:-139错误代码。为了简洁我把srcBIdx这几个参数都先设置为64,我的程序如下:
EDMA3_DRV_PaRAMRegs paramSet;
EDMA3_DRV_Handle hEdma;
unsigned int chId0= 0;
unsigned int tcc0= 0;
unsigned int edmaInstance = 0;
EDMA3_DRV_Result edmaResult = EDMA3_DRV_SOK;
//EDMA3_DRV_Result result = EDMA3_DRV_SOK;,
hEdma = edma3init(edmaInstance, &edmaResult);
/* Setup for Channel 0*/
tcc0 = EDMA3_DRV_TCC_ANY;
chId0= EDMA3_DRV_DMA_CHANNEL_ANY;
/***************/
// Request any DMA channel and any TCC
EDMA3_DRV_requestChannel (hEdma, &chId0, &tcc0, (EDMA3_RM_EventQueue)0, NULL, NULL);
paramSet.srcBIdx = 64;
paramSet.destBIdx = 64;
paramSet.srcCIdx = 64;
paramSet.destCIdx = 64;
// For AB-synchronized transfers, BCNTRLD is not used.
paramSet.bCntReload = 64;
paramSet.linkAddr = 0xFFFFu;
// Src & Dest are in INCR modes
paramSet.opt &= 0xFFFFFFFCu;
// Program the TCC
paramSet.opt |= ((tcc0 << OPT_TCC_SHIFT) & OPT_TCC_MASK);
// Enable Intermediate & Final transfer completion interrupt
paramSet.opt |= (1 << OPT_ITCINTEN_SHIFT);
paramSet.opt |= (1 << OPT_TCINTEN_SHIFT);
paramSet.opt |= (1 << OPT_SYNCDIM_SHIFT);
/****************************************/
EDMA3_DRV_setPaRAM(hEdma, chId0, ¶mSet);
srcAddr = (Uint32)pMatC ;
dstAddr = (Uint32)pBufPackCL2 ;
pParamSet->srcAddr = srcAddr;
pParamSet->destAddr = dstAddr;
/* Now, write the PaRAM Set. */
EDMA3_DRV_setPaRAM(hEdma, chId, pParamSet);
EDMA3_DRV_setSrcParams (hEdma, chId, srcAddr, EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_W8BIT);
EDMA3_DRV_setDestParams(hEdma, chId, dstAddr, EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_W8BIT);
EDMA3_DRV_Result result = EDMA3_DRV_SOK;
// trigger DMA transfer
result = EDMA3_DRV_enableTransfer (hEdma, chId, EDMA3_DRV_TRIG_MODE_MANUAL);
if (result != EDMA3_DRV_SOK)
printf ("edma3_test: EDMA3_DRV_enableTransfer Failed, error code: %d\r\n", result);