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.

TM4C129ENCPDT: uDMA: Ping-Pong a valid mode for SSI Transmit?

Part Number: TM4C129ENCPDT
Other Parts Discussed in Thread: EK-TM4C129EXL

When using uDMA with the SSI peripheral, is Ping-Pong mode a valid mode for Transmit?

Asking because I am studying the Ping-Pong uDMA example at TivaWare_C_Series-2.1.4.178/examples/boards/ek-tm4c129exl/udma_demo/udma_demo.c and it is using Ping-Pong for Receive, but Basic mode for Transmit. The function call to setup the Transmit DMA has this comment: "Basic mode is used because the peripheral is making the uDMA transfer." Does this comment mean that Ping-Pong cannot / should not be used when the peripheral makes the DMA request?

Showing the relevant code, from the InitUART1Transfer() function of the above-mentioned example program, for reference:

    // Set up the transfer parameters for the uDMA UART TX channel.  This will
    // configure the transfer source and destination and the transfer size.
    // Basic mode is used because the peripheral is making the uDMA transfer
    // request.  The source is the TX buffer and the destination is the UART
    // data register.
    //
    ROM_uDMAChannelTransferSet(UDMA_CHANNEL_UART1TX | UDMA_PRI_SELECT,
                               UDMA_MODE_BASIC, g_ui8TxBuf,
                               (void *)(UART1_BASE + UART_O_DR),
                               sizeof(g_ui8TxBuf));

Thank you.

  • Ping-pong mode can be used for filling the transmit buffer of a peripheral. The program must prepare the second buffer before the first buffer finishes transmitting. 

  • Bob Crosby said:

    Ping-pong mode can be used for filling the transmit buffer of a peripheral. The program must prepare the second buffer before the first buffer finishes transmitting. 

    Yes, I have done this. During initialization, I prepare both the first and second buffers. In the DMA completion ISR, I replenish the buffer that just finished.

    Thank you for your reply.