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.

c6748 EDMA question

Other Parts Discussed in Thread: OMAP-L138

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);
}

  • Si Cheng,

    Most likely, there are some initialization steps missing from your direct-register method of driving the EDMA3 module.

    Please use the EDMA3_LLD software library. It includes examples that show how to use those functions, and it includes all the initialization that will be needed.

    If you decide later to use direct-register writes for the EDMA3 transfers, you can compare all of the registers that are set by the LLD to how the registers are set by your code.

    The EDMA3_LLD is the preferred method we recommend for this device.

    Regards,
    RandyP

  • hello:

    thanks for your reply!

    the edma_lld example all are based on bios,I want to drver the edma

    without bios! can you give me an example without bios?

    can you tell me what initial steps miss from my driver ?

    thanks!

  • If I knew the initial steps missing from your driver, it would be easy to tell you. All of the initial steps have been taken care of in the LLD, the code has been tested, and the functions have been documented with examples to help you. The recommendation is to use the LLD and SYS/BIOS (or DSP/BIOS). At the very least, build the project with BIOS and LLD to get the EDMA3 module working, then look at the registers to compare what is different from your direct method.

    You may find some other users who have tried using direct-register programming for EDMA3 by doing some searches on the E2E forum. There may be code examples for the devices they used. Also, you will find an example of programming the EDMA3 without the LLD on the TI Wiki Pages; search for EDMA3.

    Unless you find a complete working and tested example for the C6748 or OMAP-L138 on one of these searches, there may be slightly different features between the device example and your device. These differences are taken into consideration in the LLD.

    Regards,
    RandyP

  • Please compare and contrast your example with the simple non-os examples provided here

    http://processors.wiki.ti.com/index.php/QuickStartOMAPL1x_rCSL

    Additionally to develop drivers without using BIOS/Linux we strongly recommend that you consider using Starterware