cancel
Showing results for 
Search instead for 
Did you mean: 

Uart reception by IT and emission by DMA

pdufrene
Associate
Posted on July 02, 2007 at 09:33

Uart reception by IT and emission by DMA

3 REPLIES 3
pdufrene
Associate
Posted on May 17, 2011 at 09:44

Hello,

I am trying to do the following:

To have an interruption each time I received a byte on the UART.

To emit a buffer of data by DMA transfer.

The problem I have is that if I want an interruption each time I received a byte I have to disable the UART FIFO (because even in 1/8 fifo event, I have an interruption only every 2 bytes). And if I disable Fifo, DMA don't work...

I also tried to disable fifo when I am waiting for incomming bytes and enable it when I emit data.

But the DMA interruption occured before the FIFO is empty, so if I immediatly disable Fifo I lost the last 4 bytes and If i wait for the fifo to be empty I am wasting 1500µs.

Do you have any suggestion?

jens239955_stm1_st
Associate II
Posted on May 17, 2011 at 09:44

I have the same problem with my application, and I also don't know how to solve it. If there just where a TX-complete interrupt, based on the ''Busy'' bit in flag register of the uart it would solve the problem.

If I find a solution how to generate an interrupt at the end of transmission I will let you know...

jens239955_stm1_st
Associate II
Posted on May 17, 2011 at 09:44

Hi again

I have solved my problem by using ReceiveTimeoutInterrupt. I simply wired my Tx to the Rx, though I loose my full duplex it works in my application. Now I have Interrupts when I receive, and when the TxFIFO i empty.