I cannot get a list mode or array mode memory DMA to complete using either fast stream 2 or 3. Only the single DMA block function adi_mdma_Copy1D() completes using fast streams 2 or 3.
I tried the CCES example project "Memory DMA Copy Array Mode (SC589 SHARC)" which uses adi_mdma_Copy1Darray() and it works fine on streams 0 and 1 but hangs here using fast streams 2 or 3:
while ((bMemCopyInProgress) && (TimeOutCount))
{
eResult = adi_mdma_IsCopyInProgress (hMemDmaStream, &bMemCopyInProgress);
if (eResult != ADI_DMA_SUCCESS) {
DBG_MSG("Failed to query status of Memory DMA copy, Error Code: 0x%08X\n", eResult);
break;
}
TimeOutCount--;
}
I used these setting for stream 2:
// Make MDMA2 Destination to generate secure transactions
if(adi_spu_EnableMasterSecure(hSpu, 140, true) != ADI_SPU_SUCCESS) {
DBG_MSG("Failed to enable Master secure for MDMA 2 Destination\n");
eResult = ADI_DMA_FAILURE;
}
eResult = adi_mdma_Open (2, &MemDmaStreamMem[0], &hMemDmaStream, &hSrcDmaChannel, &hDestDmaChannel, NULL, NULL);
if (eResult != ADI_DMA_SUCCESS) {
DBG_MSG("Failed to open MDMA stream, Error Code: 0x%08X\n", eResult);
}
I also tried the ADI project "Descriptor_Based_MDMA_Core1" and it works fine on stream 0 but hangs at WAIT_FOR_DMADONE(40) for stream 2.
I used these setting for stream 2:
//Enable MDMA2 stream as secure master
*pREG_SPU0_SECUREP140 = BITM_SPU_SECUREP_MSEC;
*pREG_DMA39_CFG=SRC_DMA_CFG;
*pREG_DMA39_DSCPTR_NXT=(int)SrcTCB1|0x28000000;
*pREG_DMA40_CFG=DST_DMA_CFG;
*pREG_DMA40_DSCPTR_NXT=(int)DestTCB1|0x28000000;
//Wait till the second work unit is complete
WAIT_FOR_DMADONE(40); // destination DMA channel
Please explain how to get memory DMA to complete using array mode or descriptor mode using either fast stream 2 or 3.
Thank you