DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
277 of 571
NXP Semiconductors
UM10316
Chapter 19: LPC29xx Universal Asynchronous Receiver/Transmitter
The CTI interrupt (UnIIR[3:1] = 110) is a second level interrupt and is set when the UARTn
Rx FIFO contains at least one character and no UARTn Rx FIFO activity has occurred in
3.5 to 4.5 character times. Any UARTn Rx FIFO activity (read or write of UARTn RSR) will
clear the interrupt. This interrupt is intended to flush the UARTn RBR after a message has
been received that is not a multiple of the trigger level size. For example, if a peripheral
wished to send a 105 character message and the trigger level was 10 characters, the
CPU would receive 10 RDA interrupts resulting in the transfer of 100 characters and 1 to 5
CTI interrupts (depending on the service routine) resulting in the transfer of the remaining
5 characters.
[1]
Values "0000", “0011”, “0101”, “0111”, “1000”, “1001”, “1010”, “1011”,”1101”,”1110”,”1111” are reserved.
[2]
For details see
Section 19–4.9 “UARTn Line Status Register”
[3]
For details see
Section 19–4.1 “UARTn Receiver Buffer Register”
[4]
For details see
Section 19–4.5 “UARTn Interrupt Identification Register”
The UARTn THRE interrupt (UnIIR[3:1] = 001) is a third level interrupt and is activated
when the UARTn THR FIFO is empty provided certain initialization conditions have been
met. These initialization conditions are intended to give the UARTn THR FIFO a chance to
fill up with data to eliminate many THRE interrupts from occurring at system start-up. The
initialization conditions implement a one character delay minus the stop bit whenever
THRE = 1 and there have not been at least two characters in the UnTHR at one time
since the last THRE = 1 event. This delay is provided to give the CPU time to write data to
UnTHR without a THRE interrupt to decode and service. A THRE interrupt is set
immediately if the UARTn THR FIFO has held two or more characters at one time and
currently, the UnTHR is empty. The THRE interrupt is reset when a UnTHR write occurs or
a read of the UnIIR occurs and the THRE is the highest interrupt (UnIIR[3:1] = 001).
Table 235. UARTn Interrupt Handling
U0IIR[3:0]
value
Priority Interrupt Type
Interrupt Source
Interrupt Reset
0001
-
None
None
-
0110
Highest RX Line Status
/ Error
or BI
UnLSR Read
0100
Second RX Data
Available
Rx data available or trigger level reached
in FIFO (UnFCR0=1)
UnRBR Read
or UARTn FIFO
drops below
trigger level
1100
Second Character
Time-out
indication
Minimum of one character in the Rx
FIFO and no character input or removed
during a time period depending on how
many characters are in FIFO and what
the trigger level is set at (3.5 to 4.5
character times).
The exact time will be:
[(word length)
×
7 - 2]
×
8 + [(trigger level
- number of characters)
×
8 + 1] RCLKs
UnRBR Read
0010
Third
THRE
THRE
UnIIR Read (if
source of
interrupt) or
THR write