Skip to main content
Visitor II
July 2, 2007
Question

Uart reception by IT and emission by DMA

  • July 2, 2007
  • 3 replies
  • 855 views
Posted on July 02, 2007 at 09:33

Uart reception by IT and emission by DMA

    This topic has been closed for replies.

    3 replies

    pdufreneAuthor
    Visitor II
    May 17, 2011
    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?

    Visitor II
    May 17, 2011
    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...

    Visitor II
    May 17, 2011
    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.