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
273 of 523
NXP Semiconductors
UM10462
Chapter 12: LPC11U3x/2x/1x USART
•
If necessary, program PRESETCTRL (
) so that the USART is not continuously
reset.
•
Program one IOCON register to enable a USART TXD function.
•
If the smart card requires a clock, program one IOCON register to select the USART
SCLK function. The USART will use it as an output.
•
Program UARTCLKDIV (
) for an initial USART frequency of 3.58 MHz.
•
Program the OSR (
) for 372x oversampling.
•
If necessary, program the DLM and DLL (
) to 00 and 01 respectively, to
pass the USART clock through without division.
•
Program the LCR (
) for 8-bit characters, parity enabled, even parity.
•
Program the GPIO signals associated with the smart card so that (in this order):
a. Reset is low.
b. VCC is provided to the card (GPIO pins do not have the required 200 mA drive).
c. VPP (if provided to the card) is at “idle” state.
•
Program SCICTRL (
) to enable the smart card feature with the desired
options.
•
Set up one or more timer(s) to provide timing as needed for ISO 7816 startup.
•
Program SYSAHBCLKCTRL (
) to enable the USART clock.
Thereafter, software should monitor card insertion, handle activation, wait for answer to
reset as described in ISO7816-3.
12.7 Architecture
The architecture of the USART is shown below in the block diagram.
The APB interface provides a communications link between the CPU or host and the
USART.
The USART receiver block, RX, monitors the serial input line, RXD, for valid input. The
USART RX Shift Register (RSR) accepts valid characters via RXD. After a valid character
is assembled in the RSR, it is passed to the USART RX Buffer Register FIFO to await
access by the CPU or host via the generic host interface.
The USART transmitter block, TX, accepts data written by the CPU or host and buffers the
data in the USART TX Holding Register FIFO (THR). The USART TX Shift Register (TSR)
reads the data stored in the THR and assembles the data to transmit via the serial output
pin, TXD1.
The USART Baud Rate Generator block, BRG, generates the timing enables used by the
USART TX block. The BRG clock input source is USART_PCLK. The main clock is
divided down per the divisor specified in the DLL and DLM registers. This divided down
clock is a 16x oversample clock, NBAUDOUT.
The interrupt interface contains registers IER and IIR. The interrupt interface receives
several one clock wide enables from the TX and RX blocks.
Status information from the TX and RX is stored in the LSR. Control information for the TX
and RX is stored in the LCR.