Content originally posted in LPCWare by BM10 on Tue Nov 06 13:16:23 MST 2012
Hi all.
I've been trying to find an answer to a question that has been bugging me for quite some time. I am sure that the answer is simple but I am also a newbie, so be patient.
This is the scenario:
I am using a LPC1769 UART port to communicate with a GPS module. So far, I was able to transmit data to the GPS module successfully.
However, on the receiving part, I was not so lucky.
My objective is to build the receiving code that triggers as little UART interruptions as possible.
From what I've seen so far on the User Manual, I can accomplishe this by:
1- Operating the UART port using DMA
or
2- Configuring the "RX Trigger Level" on FCR register to 14 characters
Once this is done I'll be able to do some test and check which option has better performance.
My real problem concerns option "2". How to use the UART with "RX Trigger Level" different from 1 character?
From what I understood, the "RX Trigger Level" "determine how many receiver UARTn FIFO characters must be written before an interrupt or DMA request is activated." (UM §14.4.6)
Question1: Considering that the received data is stores in Receiver Buffer Register (wich is only 1 byte long), where are the remaining characters stored when "RX Trigger Level!=0" and the UART interrupt is triggered?
Question2: "§14.2 Features" state that LPC1769 has "16 byte Receive and Transmit FIFOs". Where are they? Which register? How can I use them
I hope I was able to explain my doubts clearly.
Any clarification, tutorial and/or sample code is wellcome (All the sample code I found so far is using "RX Trigger Level==0").
Thanks in advance.