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.

AM6548: UDMA completion with interrupt or channel completion signal

Part Number: AM6548

Hi

Like to see how I can setup an interrupt so that when teh UDMA has completed i get a notification. with the UDMA baremetal memory copy it seems that once the UDMA transfer is completed the channel calls a function. I like to get a baremetal example code to show me how to setup the interrupt on the R5F once the UDMA transfer is completed.

Thanks

  • Mohsen,

    The UDMA driver has a callback function to handle the completion event. In the current memcpy example (and other UDMA examples), this callback posts to a semaphore, while the main application is pending on this semaphore to wait for the completion of the requested transfer.

    You could replace this callback with another function, or change the application to begin other (e.g. "pong") processing rather than immediately pending.

    See the callback function:
    >>>

    #if defined (UDMA_TEST_INTR)
    static void App_udmaEventDmaCb(Udma_EventHandle eventHandle, uint32_t eventType, void *appData)
    {
        if(UDMA_EVENT_TYPE_DMA_COMPLETION == eventType)
        {
          SemaphoreP_post(gUdmaAppDoneSem);
        }
        else
        {
          gUdmaAppResult = UDMA_EFAIL;
        }

        return;
    }

    <<< 

    Best regards,

    Dave