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.

EDMA3 : Polling Problem

Hi,

When I use EDMA3 (instance = 2) to transfer data between external memories using polling,sometimes the same code works well but in few cases,the data gets transferred  but IPR  bit does not get set so it remains stuck within the loop.

Platform used : TCI6618

EDMA3 version used : 02_11_02_11

Here is the main part  of my code:

CSL_Status status;
CSL_Edma3CmdIntr regionIntr;
unsigned long long ullTemp;

// all remaining configuration has been done during initialisation
/* Configure Param */
DataTransferParam.srcAddr = (UInt32)pSrcAddr;
DataTransferParam.aCntbCnt = CSL_EDMA3_CNT_MAKE (nofBytes, 1);
DataTransferParam.dstAddr = (UInt32) pDstAddr;

if (CSL_SOK != CSL_edma3ParamSetup (hDataTransferParam, &DataTransferParam))
{
System_printf ("Error : EDMA Failed to setup parameter entry hDataTransferParam\n");
return -1;
}

/* Start the transfer manually */
if ((status = CSL_edma3HwChannelControl (hDataTransferCh, CSL_EDMA3_CMD_CHANNEL_SET, NULL)) != CSL_SOK)
{
System_printf ("Error  : EDMA Trigger for  Data Transfer channel failed \n");
return -1;
}

do {
CSL_edma3GetHwStatus(hModule,CSL_EDMA3_QUERY_INTRPEND, &regionIntr);
ullTemp = _itoll( regionIntr.intrh, regionIntr.intr );
} while (!(ullTemp & ((unsigned long long)1 << EDMA3_DATA_TRANSFER_CH)));

.......

.....

Could someone explain what can be the problem.

Thanks

-Bharti

  • Hi Bharti,

    The reason that the EDMA3 IPR bit does not get set could possibly be the access to the external memory got hang and the EDMA3 does not see a "DONE" signal. 

    Thanks,

    Tai

  • Bharti,

    What other routines are dealing with EDMA3 IPR bits? Do you have some DMA channels that are generating interrupts, so an EDMA3 Interrupt Dispatcher is checking and clearing bits?

    Some EDMA Dispatchers will automatically clear all IPR bits instead of just the ones that match with IER bits. Since you are using CSL and not the LLD, you might have based you EDMA dispatcher on routines that do that.

    Or, is there any other code that uses this same DMA channel?

    Look at all the EDMA3 registers for instance 2 to see if any errors occurred. Look at the PARAM for this channel to see how it has been updated, or not.

    After you have looked at the possibilities Tai and I have mentioned, please reply back with your progress or new information and status.

    Regards,
    RandyP