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.

CC3200 UART DMA Demo sets UDMA_ATTR_USEBURST

Other Parts Discussed in Thread: CC3200

Hello

I experimented a while with this CC3200 UART_DMA Demo from CC3200 SDK V1.0.0. There is a function in dma_if.c "SetupTransfer" which always sets UDMA_ATTR_USEBURST. See below.

void SetupTransfer(unsigned long ulChannel,
                   unsigned long ulMode,
                   unsigned long ulItemCount,
                   unsigned long ulItemSize,
                   unsigned long ulArbSize,
                   void *pvSrcBuf,
                   unsigned long ulSrcInc,
                   void *pvDstBuf,
                   unsigned long ulDstInc)
{

    MAP_uDMAChannelControlSet(ulChannel,
                              ulItemSize | ulSrcInc | ulDstInc | ulArbSize);
    MAP_uDMAChannelAttributeEnable(ulChannel,UDMA_ATTR_USEBURST);
    MAP_uDMAChannelTransferSet(ulChannel, ulMode,
                               pvSrcBuf, pvDstBuf, ulItemCount);
    MAP_uDMAChannelEnable(ulChannel);

}


DMA has two modes. if only one character is received (only one character is in fifo), a "single_data_transfer_request" is sent to the DMA. If this is not serviced, and further characters are received and the RX-Fifo-Threshold is exceeded, a "burst_transfer_request" is sent to the DMA.

In case of a uart_reception, it is good to have a response on single characters. But in this DMA Example, the attribute UDMA_ATTR_USEBURST exactly inhibits that!

"Single data transfer requests" are ignored and only Burst Transfer requests are serviced. In this example, only if at least two characters are in the fifo, a DMA-Transfer is invoked.

In TecRefManual_swru367b chapter 4.2.7.1 it says:
"we recommend against the use of this configuration since it could cause the tail end of transmissions to stick in the FIFO."

From my point of view, this line "MAP_uDMAChannelAttributeEnable(ulChannel,UDMA_ATTR_USEBURST);" need to be deleted or changed to AttributeDisable

Johannes

  • Hi Johannes,

    You are right! When the usecase is indeed for single character transfers, useburst is not the right configuration.

    All the sample examples in the SDK that use the DMA, perform block transfers and hence the function works fine.

    The example files only cover some common usecases and will need updates specific to usecases. Do feel free to update the file to suit your usecase.

    Best regards,

    Naveen