UM10462 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2016. All rights reserved.
User manual Rev. 5.5 — 21 December 2016 247 of 523
NXP Semiconductors
UM10462
Chapter 12: LPC11U3x/2x/1x USART
Bits IIR[9:8] are set by the auto-baud function and signal a time-out or end of auto-baud
condition. The auto-baud interrupt conditions are cleared by setting the corresponding
Clear bits in the Auto-baud Control Register.
If the IntStatus bit is one and no interrupt is pending and the IntId bits will be zero. If the
IntStatus is 0, a non auto-baud interrupt is pending in which case the IntId bits identify the
type of interrupt and handling as described in Table 236
. Given the status of IIR[3:0], an
interrupt handler routine can determine the cause of the interrupt and how to clear the
active interrupt. The IIR must be read in order to clear the interrupt prior to exiting the
Interrupt Service Routine.
The USART RLS interrupt (IIR[3:1] = 011) is the highest priority interrupt and is set
whenever any one of four error conditions occur on the USART RX input: overrun error
(OE), parity error (PE), framing error (FE) and break interrupt (BI). The USART Rx error
condition that set the interrupt can be observed via LSR[4:1]. The interrupt is cleared upon
a LSR read.
The USART RDA interrupt (IIR[3:1] = 010) shares the second level priority with the CTI
interrupt (IIR[3:1] = 110). The RDA is activated when the USART Rx FIFO reaches the
trigger level defined in FCR7:6 and is reset when the USART Rx FIFO depth falls below
the trigger level. When the RDA interrupt goes active, the CPU can read a block of data
defined by the trigger level.
The CTI interrupt (IIR[3:1] = 110) is a second level interrupt and is set when the USART
Rx FIFO contains at least one character and no USART Rx FIFO activity has occurred in
3.5 to 4.5 character times. Any USART Rx FIFO activity (read or write of USART RSR) will
clear the interrupt. This interrupt is intended to flush the USART RBR after a message has
been received that is not a multiple of the trigger level size. For example, if a 105
character message was to be sent 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.
Table 236. USART Interrupt Handling
IIR[3:0]
value
[1]
Priority Interrupt
type
Interrupt source Interrupt
reset
0001 - None None -
0110 Highest RX Line
Status /
Error
OE
[2]
or PE
[2]
or FE
[2]
or BI
[2]
LSR Read
[2]
0100 Second RX Data
Available
Rx data available or trigger level reached in FIFO
(FCR0=1)
RBR
Read
[3]
or
USART
FIFO drops
below
trigger level