UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
264 of 464
NXP Semiconductors
UM10850
Chapter 21: LPC5410x USARTs (USART0/1/2/3)
21.6.1 USART Configuration register
The CFG register contains communication and mode settings for aspects of the USART
that would normally be configured once in an application.
Remark:
Only the CFG register can be written when the ENABLE bit = 0. CFG can be set
up by software with ENABLE = 1, then the rest of the USART can be configured.
Remark:
If software needs to change configuration values, the following sequence should
be used: 1) Make sure the USART is not currently sending or receiving data. 2) Disable
the USART by writing a 0 to the Enable bit (0 may be written to the entire register). 3)
Write the new configuration value, with the ENABLE bit set to 1.
Table 307. USART Configuration register (CFG, offset 0x00) bit description
Bit
Symbol
Value Description
Reset
Value
0
ENABLE
USART Enable.
0
0
Disabled. The USART is disabled and the internal state machine and counters are
reset. While Enable = 0, all USART interrupts and DMA transfers are disabled. When
Enable is set again, CFG and most other control bits remain unchanged. For instance,
when re-enabled, the USART will immediately generate a TxRdy interrupt (if enabled
in the INTENSET register) or a DMA transfer request because the transmitter has
been reset and is therefore available.
1
Enabled. The USART is enabled for operation.
1
-
Reserved. Read value is undefined, only zero should be written.
NA
3:2
DATALEN
Selects the data size for the USART.
00
0x0
7 bit Data length.
0x1
8 bit Data length.
0x2
9 bit data length. The 9th bit is commonly used for addressing in multidrop mode. See
the ADDRDET bit in the CTL register.
0x3
Reserved.
5:4
PARITYSEL
Selects what type of parity is used by the USART.
00
0x0
No parity.
0x1
Reserved.
0x2
Even parity. Adds a bit to each character such that the number of 1s in a transmitted
character is even, and the number of 1s in a received character is expected to be
even.
0x3
Odd parity. Adds a bit to each character such that the number of 1s in a transmitted
character is odd, and the number of 1s in a received character is expected to be odd.
6
STOPLEN
Number of stop bits appended to transmitted data. Only a single stop bit is required for
received data.
0
0
1 stop bit.
1
2 stop bits. This setting should only be used for asynchronous communication.
7
MODE32K
Selects standard or 32 kHz clocking mode.
0
0
Disabled. USART uses standard clocking.
1
Enabled. USART uses the 32 kHz clock from the RTC oscillator as the clock source to
the BRG, and uses a special bit clocking scheme.