cancel
Showing results for 
Search instead for 
Did you mean: 

UART RX DMA - The Right way to work ?

yossi_z
Associate II
Posted on March 05, 2007 at 11:28

UART RX DMA - The Right way to work ?

2 REPLIES 2
yossi_z
Associate II
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

mbeakes
Associate II
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 ...