I am using the EVM6678 2.12.0 and MCSDK version 1.1.2.6
I have a large EDMA transfer that is set up to perform a ping pong transfer from from Core5 (L2SSRAM) and Core6 (L2SSRAM) to Core7 (L2SSRAM). Each is setup with AB sync and is chained to the other upon intermediate completion. The both use the same event queue so they don't step on each other. ALL of the EDMA registers and configuration is done from core 7 using the EDMA LLD only. The system runs well most of the time. Every once in a while (one in ten runs), the EDMA tranfer will appear stalled. By stalled, I mean the following:
1. 119 transfers have successfully completed
2. Both PARAM sets are partially transferred, CCount (Starts at 5) is 2
3. No TC errors that I can see
4. No CC errors or error interrupts
5. No Missed events
In the debugger, it just appears like it's sitting there waiting for something. What's baffling is that when it works, it will run for several minutes with not issues whatsoever. When it breaks, it is always after 119 transfers as stated above. Below is the setup code for this:
static void BaseTccInterruptHdlr(uint32_t tcc, EDMA3_RM_TccStatus status, void *pEdmaInstArg)
{
BaseEdmaChannel *pEdmaChnl = (BaseEdmaChannel *)pEdmaInstArg;
if (pEdmaChnl != NULL)
{
pEdmaChnl->m_nInterrupts++;
if (status == EDMA3_RM_XFER_COMPLETE)
{
m_XferBusySemaphore.Post();
pEdmaChnl->m_XfersCompleted++;
}
else
{
pEdmaChnl->m_EvtsMissed++;
}
}
}
EDMA3_DRV_Handle m_hEdmaInst;
void DoTransfer()
{
uint32_t m_nChnlCntrl0 = EDMA3_DRV_DMA_CHANNEL_ANY;
uint32_t m_nChnlCntrl1 = EDMA3_DRV_DMA_CHANNEL_ANY;
uint32_t m_nTcc0 = EDMA3_DRV_TCC_ANY;
uint32_t m_nTcc1 = EDMA3_DRV_TCC_ANY;
// Request Master
result = EDMA3_DRV_requestChannel ( m_hEdmaInst,
&m_nChnlCntrl0,
&m_nTcc0,
(EDMA3_RM_EventQueue)0,
BaseTccInterruptHdlr,
pEdmaInst);
// Request Slave
result = EDMA3_DRV_requestChannel ( m_hEdmaInst,
&m_nChnlCntrl1,
&m_nTcc1,
(EDMA3_RM_EventQueue)0,
BaseTccInterruptHdlr,
NULL);
// Master
EDMA3_DRV_setSrcIndex (m_hEdmaInst, m_nChnlCntrl0, 1024, 8192);
EDMA3_DRV_setDestIndex (m_hEdmaInst, m_nChnlCntrl0, 2048, 16384);
EDMA3_DRV_setTransferParams (m_hEdmaInst, m_nChnlCntrl0, 1024, 8, 5, 8, EDMA3_DRV_SYNC_AB);
// Slave
EDMA3_DRV_setSrcIndex (m_hEdmaInst, m_nChnlCntrl0, 1024, 8192);
EDMA3_DRV_setDestIndex (m_hEdmaInst, m_nChnlCntrl0, 2048, 16384);
EDMA3_DRV_setTransferParams (m_hEdmaInst, m_nChnlCntrl0, 1024, 8, 5, 8, EDMA3_DRV_SYNC_AB);
// Chaining
EDMA3_DRV_ChainOptions masterChainOpts, slaveChainOpts;
masterChainOpts.itcchEn = EDMA3_DRV_ITCCHEN_EN; // Chain intermediate xfers
masterChainOpts.tcchEn = EDMA3_DRV_TCCHEN_EN; // Chain final transfer
masterChainOpts.itcintEn = EDMA3_DRV_ITCINTEN_DIS; // Disable intermediate xfer interrupt
masterChainOpts.tcintEn = EDMA3_DRV_TCINTEN_DIS; // Disable final xfer interrupt
slaveChainOpts.itcchEn = EDMA3_DRV_ITCCHEN_EN; // Chain intermediate xfers
slaveChainOpts.tcchEn = EDMA3_DRV_TCCHEN_DIS; // Final slave transfer is NOT chained
slaveChainOpts.itcintEn = EDMA3_DRV_ITCINTEN_DIS; // Disable intermediate xfer interrupt
slaveChainOpts.tcintEn = EDMA3_DRV_TCINTEN_EN; // Once all xfers complete, trigger interrupt
EDMA3_DRV_chainChannel(m_hEdmaInst, m_nChnlCntrl0, m_nChnlCntrl1, &masterChainOpts);
EDMA3_DRV_chainChannel(m_hEdmaInst, m_nChnlCntrl1, m_nChnlCntrl0, &slaveChainOpts);
// Source and dest addrs
pSrc0 = buffer in L2SRAM on core5
pSrc1 = buffer in L2SRAM on core6
pDest = buffer in L2SRAM on core7
EDMA3_DRV_setSrcParams (m_hEdmaInst, m_nChnlCntrl0, ConvertToGlobalAddr(pSrc0), EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_W8BIT);
EDMA3_DRV_setSrcParams (m_hEdmaInst, m_nChnlCntrl1, ConvertToGlobalAddr(pSrc1), EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_W8BIT);
EDMA3_DRV_setDestParams (m_hEdmaInst, m_nChnlCntrl0, ConvertToGlobalAddr(pDest), EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_W8BIT);
EDMA3_DRV_setDestParams (m_hEdmaInst, m_nChnlCntrl1, ConvertToGlobalAddr(pDest + 1024), EDMA3_DRV_ADDR_MODE_INCR, EDMA3_DRV_W8BIT);
// Start the transfer
EDMA3_DRV_enableTransfer (m_hEdmaInst, m_nChnlCntrl0, EDMA3_DRV_TRIG_MODE_MANUAL);
}
What should I be looking for to diagnose the problems here?
Thanks,
Dan