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.

Forced EDMA Link Updates

Hi, Is there a way to force a link update on a PaRAM set before it is naturally exhausted?

The reason I want to do this is in case I program EDMA with UART Rx, so I have to configure the EDMA PaRAM set to a certain length of incoming data.

But if in fact I receive less data than the programmed length then the EDMA is stuck waiting for events, so I set a timeout - if it expires I want to take whatever data is available on the current (say Ping) Ping-Pong buffer and force a link update so that if new data arrives the EDMA is loading it into the other (say Pong) buffer while the CPU handles the first (say Ping) buffer.

Thanks,

Alex

  • Hi,

    Thanks for your post.

    It would made you to think forced EDMA link update scenario only if your link update fails in your case. I would suggest you to insert a second dummy transfer of 0 bytes which is legal would fix your issue and will link correctly to the LINK field address when the dummy transfer is executed.

    Usually, When the EDMA submits the transfer request (TR) for the PaRAM, it uses the link PaRAM contents present at the time the TR is submitted. For the single PaRAM case, the PaRAM is "empty" at the time of transfer request so no linking takes place (it gets written when the TR is complete, but it is too late by that time).  In your case, you have taken care in setting a timeout event in which EDMA wouldn't stuck in waiting for sync event in case, if it receives lesser data than the programmed data length, so the original write to the desired destination would have happened from the first transfer and proper link update would happen when second dummy transfer would be executed, thus it wouldn't have necessity to force a link update on the first transfer which would let link update happen naturally on the second dummy transfer.

    Maybe, you can configure the dummy PaRAM set are as follows:

    prm->opt = 0x82418000;

    prm->srcAddr = NULL;

    prm->destAddr = NULL;

    prm->aCnt       = 1;

    prm->bCnt       = 0;

    prm->cCnt       = 0;

    prm->bCntReload = 0;

    prm->srcBIdx    = 0;

    prm->destBIdx   = 0;

    prm->srcCIdx    = 0;

    prm->destCIdx   = 0;

    prm->linkAddr   = 0xXXXX; (configure accordingly for your case)

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question

    -------------------------------------------------------------------------------------------------------

  • Hi Sivaraj,

    Thanks for your quick reply.

    Let me see if I get this right:

    You suggest that I configure a dummy transfer (that is triggered by timer timeout).

    From the opt. field that you wrote I see that you configure chaining to TCC 24 on completion of dummy set

    You say that when it is triggered it will make the currently executing PaRAM  (that serves UART interrupts) perform a link update.

    From your PaRAM settings I don't understand several things:

    Why are you using chaining to PaRAM on TCC 24?

    Why are you writing to PRIV and PRIVID fields?

    And why would the Link update occur after the chaining event? As I understand this is equivalent to receiving 1 interrupt from the UART, and if the length is not achieved after that 1 event then the PaRAM for the UART channel won't be exhausted.

    Sorry for so many questions, I want to make sure I understand you correctly.

    Thanks,

    Alex

  • Hi,

    I apologize that OPT can be configured with your desired requirements and whichever mentioned on my post is just an instance for a dummy transfer PaRAM set EDMA configuration.

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question

    -------------------------------------------------------------------------------------------------------