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.

strange problem about edma

         When I use edma, there is a strange problem. The chip is C6747. The version of edma is edma3_lld_01_11_01_04. I write a function using edma3_lld_01_11_01_04 and I call this function in my code. The problem is : sometimes edma can work well, while sometimes it will halts at while(irqRaised1==0). There is a picture about the function:

      In DSP/BIOS, I set L1P and L1D are Cache, L2 is RAM.

      I think it's impossible that the EDMA is so unstable. But I don't know where is wrong. Can somebody help me? Thank you very much.

  • Hi,

    If the associated channel is the DMA channel then the PaRAM values will be updated after the transfer is done, so you need to set the PaRAM values again before enabling the transfer. you can get the address of the PaRAM set associated with the chennel allocated using the API EDMA3_DRV_getPaRAMPhyAddr( ...) You can check the present PaRAM values before enableTransfer() is called.

    irqRaised1 will be updated in the callback function registered when you request the channel. If your code is getting stuck in the while(irqRaised1 ==0 ) then EDMA is not getting the interrupt; Please make sure the transfer is happening after the enable transfer is called.

    Regards,
    Prasad

    If this answers the question, please click  Verify Answer  , below.

  • twentz said:

    1) Why are you coding a for-loop on Ccount when it's included in the PaRAM set?

     

           I use AB Sync Transfer Mode. By this mode, every time EDMA transfers ACNT*BCNT. For transfering all data, it should loop CCNT times. So there is a for-loop.

    twentz said:

    2) You start by initializing all the paramSet fields to 0 and then use paramSet.opt &= 0xFFFFFFC -- this only guarantees that the 2 lowest bits are 0 whereas all other bits are just what they were before (set to 0). Is this what you intended to do?

     

        paramSet.opt &= 0xFFFFFFC is used to set Source  & Destination are in INCR modes. ( Source & Destination are not FIFO,  addressing within an array increments.)