Skip to main content
yossi_z
Associate II
March 5, 2007
Question

UART RX DMA - The Right way to work ?

  • March 5, 2007
  • 2 replies
  • 744 views
Posted on March 05, 2007 at 11:28

UART RX DMA - The Right way to work ?

This topic has been closed for replies.

2 replies

mbeakes
Associate II
May 17, 2011
Posted on May 17, 2011 at 09:36

Hi,

I am in the same situation. The interrupt is generated only when the UART fifo is reached. Here is my setup :

UART_RX fifo level: 8 bytes

flow control: peripheral

I start the DMA transfert (8 bytes) in the UART interrupt. If the message is more than 8 bytes, the first bytes are missing ??

I still searching ...

yossi_z
yossi_zAuthor
Associate II
May 17, 2011
Posted on May 17, 2011 at 09:36

hi,

I have downloaded one of the examples from this site (UART_Interface-DMA.zip) that implements UART RX DMA, the sample works good

The len of my data packets is not fixed, it can be 12 bytes to 80 bytes,

In this sample, The dma interrupt accures when all the requested data arrives (16 bytes), so a message of len 12 bytes can wait in the buffer until another message will arrive and trigger the interrupt.

What is the right way to do this ?

Is it possible to define timeout on the dma, so I will get interrupt when part of the data arrives and timeout had past from the last byte received ?

Thanks