hello:
I am working with c6748, and I wrote a DMA function, But it din't work ! below is my code! The DMA is manually-triggered! I hope anyone can help me!
thanks!
#include <ti/pspiom/cslr/cslr_edma3cc.h>
#include <ti/pspiom/cslr/cslr_edma3Tc.h>
#include <ti/pspiom/cslr/soc_C6748.h>
CSL_Edma3ccRegsOvly Edma3cc0Regs = (CSL_Edma3ccRegsOvly)CSL_EDMA30CC_0_REGS;
void EdmaSend(void* pDst, void* pSrc, unsigned int uiLen)
{
unsigned int uiChanNum = 10;
Edma3cc0Regs->EECR = 0xFFFFFFFF;
Edma3cc0Regs->EMCR = 0xFFFFFFFF;
Edma3cc0Regs->CCERRCLR = 0xFFFFFFFF;
Edma3cc0Regs->ICR = 0xFFFFFFFF;
Edma3cc0Regs->SECR = 0xFFFFFFFF;
Edma3cc0Regs->DRA[0].DRAE = 0xFFFFFFFF;
Edma3cc0Regs->IESR = (1<<uiChanNum);
Edma3cc0Regs->EESR = (1<<uiChanNum);
//configure PARAM
Edma3cc0Regs->PARAMSET[uiChanNum].OPT = 0x00100008;
Edma3cc0Regs->PARAMSET[uiChanNum].A_B_CNT = (1 << 16) + uiLen; //BCNT = 1, ACNT = uiLen
Edma3cc0Regs->PARAMSET[uiChanNum].CCNT = 1;
Edma3cc0Regs->PARAMSET[uiChanNum].SRC = (int)pSrc;
Edma3cc0Regs->PARAMSET[uiChanNum].DST = (int)pDst;
Edma3cc0Regs->PARAMSET[uiChanNum].SRC_DST_BIDX = 0;
Edma3cc0Regs->PARAMSET[uiChanNum].SRC_DST_CIDX = 0;
Edma3cc0Regs->PARAMSET[uiChanNum].LINK_BCNTRLD = 0xFFFF;
Edma3cc0Regs->ESR = (1 << uiChanNum);
while((Edma3cc0Regs->IPR) != (1 << uiChanNum));
Edma3cc0Regs->ICR = (1 << uiChanNum);
}