Hello,
I am working on C6657 multicore platform and I would like to trigger the edma when the an event occurs at MCSBP. But the edma is nevered triggered.
The MCSBP has been configured in digital loopback mode.
I have configured the MCSBSP following the McBSP initialization procedure that is described in the MCSBP document.
My configuration is the following:
spcr = MCBSP_SPCR_INIT;
pcr = 0x0
rcr = 0x0
xcr = 0x0
mcr = 0x0
rcere0 = -xFFFFFFFF
xcere0=0xFFFFFFFF; //enable all tx channels
xcere1=0xFFFFFFFF; //enable all tx channels
//wait at least 2 PCM clock cycles for internal syncronization
Task_sleep( 4 );
//set the XRST bit to enable the transmitter
spcr |= 0x00010000;
//wait at least 2 PCM clock cycles for internal syncronization
Task_sleep( 4 );
//disable Tx/Rx to clear a XSYNCERR, that might have occured. (see also sprugj6c for more details)
spcr = mcbsp->spcr & (~0x00010000);
pcr = 0x00000F00;
srgr = 0x20000048;//300MHz
spcr = 0x02F18031;
For the edma the logical channel has been set to EDMA3_DRV_DMA_CHANNEL_ANY and the tcc to EDMA3_DRV_HW_CHANNEL_MCBSP0_TX =37
The configuration for the edma is the following
chId = EDMA3_DRV_DMA_CHANNEL_ANY;
chId1 = EDMA3_DRV_LINK_CHANNEL;
chId2 = EDMA3_DRV_LINK_CHANNEL;
tcc = EDMA3_DRV_HW_CHANNEL_MCBSP0_TX;
result |= EDMA3_DRV_requestChannel (hEdma[0], &chId, &tcc, (EDMA3_RM_EventQueue)0, &callback, NULL;
result |= EDMA3_DRV_requestChannel (hEdma[0], &chId1, &tcc, (EDMA3_RM_EventQueue)0, &callback, NULL);
result |= EDMA3_DRV_requestChannel (hEdma[0], &chId2, &tcc, (EDMA3_RM_EventQueue)0, &callback, NULL;
paramSet.opt = 0x00100000 | (tcc<<12);
paramSet.srcAddr = (Uint32) &qdmaPingOut0;
paramSet.destAddr = mcbsp->dxr; //DXR of McBSP0
paramSet.aCnt = 1;
paramSet.bCnt = numTsl;
paramSet.cCnt = PCM_SAMPLES_PER_MS;
paramSet.bCntReload = numTsl;
paramSet.srcBIdx = 1;
paramSet.destBIdx = 0;
paramSet.srcCIdx = 1;
paramSet.destCIdx = 0;
result |= EDMA3_DRV_clearErrorBits (hEdma[0], chId);
result |= EDMA3_DRV_setPaRAM(hEdma[0], chId, ¶mSet);
result |= EDMA3_DRV_setPaRAM(hEdma[0], chId2, ¶mSet);
paramSet.srcAddr = (Uint32) &qdmaPongOut0;
result |= EDMA3_DRV_setPaRAM(hEdma[0], chId1, ¶mSet);
result |= EDMA3_DRV_linkChannel (hEdma[0], chId, chId1);
result |= EDMA3_DRV_linkChannel (hEdma[0], chId1, chId2);
result |= EDMA3_DRV_linkChannel (hEdma[0], chId2, chId1);
result |= EDMA3_DRV_enableTransfer (hEdma[0], chId, EDMA3_DRV_TRIG_MODE_EVENT);
I have checked that the value of the SPCR changes form 0x02F18031 to 0x02F38031. That means that 17th is 1. Regarding the document of MCBSP that indicates that the transmitter is ready for new data from in DXR.
Can you please check the aforementioned configuration and make some notice what probably is missing
Best regards
George