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: DMA transfer form UART to memory

Part Number: TM4C1294NCPDT

Hi Folks,

I'm working on a modbus communication stack and I wanted to use DMA for transferring characters from UART to memory. As the nature of the modbus, size of the received packages are depends on the data field and the package type. I studied  the uDMA controller and the UART.

The problem is that uDMA expects exact byte length at the beginning of the transmission, that is not available when the first character received. My current implementation read form the UART FIFO and try to compute total size.

Is it possible to issue DMA request for a large amount of data, and detect the end-of-transmission instead of reading FIFO & compute size (like disable fifo and getting receive timeout, than disable transmission etc...).

Regards,

Norbert

  • I think you are already using the best approach. Use interrupts to receive enough bytes to determine the length of the packet and then use uDMA to receive the rest.