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
257 of 523
NXP Semiconductors
UM10462
Chapter 12: LPC11U3x/2x/1x USART
Two auto-baud measuring modes are available which can be selected by the ACR Mode
bit. In Mode 0 the baud rate is measured on two subsequent falling edges of the USART
Rx pin (the falling edge of the start bit and the falling edge of the least significant bit). In
Mode 1 the baud rate is measured between the falling edge and the subsequent rising
edge of the USART Rx pin (the length of the start bit).
The ACR AutoRestart bit can be used to automatically restart baud rate measurement if a
time-out occurs (the rate measurement counter overflows). If this bit is set, the rate
measurement will restart at the next falling edge of the USART Rx pin.
The auto-baud function can generate two interrupts.
•
The IIR ABTOInt interrupt will get set if the interrupt is enabled (IER ABToIntEn is set
and the auto-baud rate measurement counter overflows).
•
The IIR ABEOInt interrupt will get set if the interrupt is enabled (IER ABEOIntEn is set
and the auto-baud has completed successfully).
The auto-baud interrupts have to be cleared by setting the corresponding ACR
ABTOIntClr and ABEOIntEn bits.
The fractional baud rate generator must be disabled (DIVADDVAL = 0) during auto-baud.
Also, when auto-baud is used, any write to DLM and DLL registers should be done before
ACR register write. The minimum and the maximum baud rates supported by USART are
a function of USART_PCLK and the number of data bits, stop bits and parity bits.
(2)
12.5.12.2 Auto-baud modes
When the software is expecting an “AT” command, it configures the USART with the
expected character format and sets the ACR Start bit. The initial values in the divisor
latches DLM and DLM don‘t care. Because of the “A” or “a” ASCII coding (“A” = 0x41,
“a” = 0x61), the USART Rx pin sensed start bit and the LSB of the expected character are
delimited by two falling edges. When the ACR Start bit is set, the auto-baud protocol will
execute the following phases:
1. On ACR Start bit setting, the baud rate measurement counter is reset and the USART
RSR is reset. The RSR baud rate is switched to the highest rate.
2. A falling edge on USART Rx pin triggers the beginning of the start bit. The rate
measuring counter will start counting UART_PCLK cycles.
3. During the receipt of the start bit, 16 pulses are generated on the RSR baud input with
the frequency of the USART input clock, guaranteeing the start bit is stored in the
RSR.
4. During the receipt of the start bit (and the character LSB for Mode = 0), the rate
counter will continue incrementing with the pre-scaled USART input clock
(UART_PCLK).
5. If Mode = 0, the rate counter will stop on next falling edge of the USART Rx pin. If
Mode = 1, the rate counter will stop on the next rising edge of the USART Rx pin.
ratemin
2
P
CLK
16
215
-------------------------
UART
baudrate
PCLK
16
2
databits
paritybits
stopbits
+
+
+
------------------------------------------------------------------------------------------------------------
ratemax
=
=