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.

TM4C1294NCPDT: Example on DMA receive

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: EK-TM4C1294XL

Hello Team,

I'm working on EK-TM4C1294XL to know exact operation of DMA with UART in EK-TM4C1294XL launchpad. I got clarity on DMA Tx with UART but need to get more clarity on DMA receive with peripheral (UART). I want one example on DMA with UART peripheral for both Transmission and Reception. Can anyone help me through one example to get clarity on DMA receive with UART of TM4C1294XL. Any help would be very thankful.  

  • Hi,

      Please refer to the the example in C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\udma_demo. This example uses uDMA to transmit and receive data from UART. 

  • Thank you for the reply Charles Tsai,
    I referred that example, in that case he used SW channel("UDMA_CHANNEL_SW") in DMA int handler then how it is related to UART peripheral receive? here i didn't get clarity about DMA Receive. I don't want to use software channel for Tx and Rx. Can you please describe me in detail only about the DMA with UART receive process. Also is there any chance to in Basic Mode for DMA with UART receive? Any help would be very thankful.

  • Hi,

      This example setup different uDMA channels to do memory-to-memory transfers as well as memory-to-UART transfers. You can remove the code pertaining to the memory-to-memory transfer if you want to keep only UART transfers.  Please refer to the UART1IntHandler() and InitUART1Transfer() on how the uDMA is setup for transfers to/from UART. We have another uDMA example in C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\udma_scatter_gather. We just don't have the exact example that your are looking for but I hope you can reference these TivaWare examples and adapt to your own requirement. 

      Wanted to give you a heads-up. I will be out of office starting tomorrow for the rest of week. I will ask my colleague to follow up if you have further questions. In case your question is missed, I will suggest you open a new post and reference this one so the moderator can assist you.

  • Thank you Charles,

    I if I remove memory to memory transfer as you suggested, then what about DMA handler.? In this DMA handler sw channel is used. Is DMA handler related to UART/UART handler? If no, can I use only UART transfer and UART handler for DMA with UART receive?

  • As you can see the comment for uDMAIntHandler is for the DMA to handle the memory to memory transfer for software channel. You can remove it if if you don't need memory to memory transfers. 

    //*****************************************************************************
    //
    // The interrupt handler for uDMA interrupts from the memory channel.  This
    // interrupt will increment a counter, and then restart another memory
    // transfer.
    //
    //*****************************************************************************
    void
    uDMAIntHandler(void)
    {