DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
FT D
RAFT DR
AFT D
DRA
FT DRAFT DRAFT
D
RAFT
D
RAFT
DRA
UM10601
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
Preliminary user manual
Rev. 1.0 — 7 November 2012
165 of 313
NXP Semiconductors
UM10601
Chapter 15: LPC800 USART0/1/2
•
Enable or disable the USART0/1/2 interrupts in slots #3 to 5 in the NVIC.
•
Configure the USART0/1/2 pin functions through the switch matrix. See
.
•
Configure the USART clock and baud rate. See
Configure the USART0/1/2 to wake up the part from low power modes:
•
Configure the USART to receive and transmit data in synchronous slave mode. See
15.3.1 Configure the USART clock and baud rate
All three USARTs use a common peripheral clock (U_PCLK) and, if needed, a fractional
baud rate generator.The peripheral clock and the fractional divider for the baud rate
calculation are set up in the SYSCON block as follows (see
1. Configure the UART clock by writing a value UARTCLKDIV > 0 in the USART
peripheral clock divider register. This is the divided main clock common to all
USARTs.
Section 4.6.14 “USART clock divider register”
2. If a fractional value is needed to obtain a particular baud rate, program the fractional
divider. The fractional divider value is the fraction of MULT/DIV. The MULT value is
programmed in the UARTFRGMULT register and the DIV value is programmed in the
UARTFRGDIV register in the SYSCON block.
U_PCLK = UARTCLKDIV/(1+MULT/DIV)
The following rules apply for MULT and DIV:
–
Always set DIV to 256 by programming the UARTFRGDIV register with the value
of 0xFF.
–
Program any value between 0 and 255 in the UARTFRGMULT register.
–
The fraction of MULT/DIV must be smaller than 1.
Section 4.6.19 “USART fractional generator multiplier value register”
Section 4.6.18 “USART fractional generator divider value register”
3. In asynchronous mode: Configure the baud rate divider BRGVAL in the USARTn BRG
register. The baud rate divider divides the common USART peripheral clock by a
factor of 16 multiplied by the baud rate value to provide the
baud rate = U_PCLK/16 x BRGVAL.
Section 15.6.9 “USART Baud Rate Generator register”
4. In synchronous mode: The serial clock is Un_SCLK = U_PCLK/BRGVAL