UM10429
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2010. All rights reserved.
User manual
Rev. 1 — 20 October 2010
80 of 258
NXP Semiconductors
UM10429
Chapter 10: LPC1102 Universal Asynchronous Transmitter (UART)
10.5.11 Auto-baud
The UART auto-baud function can be used to measure the incoming baud rate based on
the ”AT" protocol (Hayes command). If enabled the auto-baud feature will measure the bit
time of the receive data stream and set the divisor latch registers U0DLM and U0DLL
accordingly.
Auto-baud is started by setting the U0ACR Start bit. Auto-baud can be stopped by clearing
the U0ACR Start bit. The Start bit will clear once auto-baud has finished and reading the
bit will return the status of auto-baud (pending/finished).
Two auto-baud measuring modes are available which can be selected by the U0ACR
Mode bit. In Mode 0 the baud rate is measured on two subsequent falling edges of the
UART 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 UART Rx pin (the length of the start bit).
The U0ACR 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 UART Rx pin.
The auto-baud function can generate two interrupts.
•
The U0IIR ABTOInt interrupt will get set if the interrupt is enabled (U0IER ABToIntEn
is set and the auto-baud rate measurement counter overflows).
•
The U0IIR ABEOInt interrupt will get set if the interrupt is enabled (U0IER ABEOIntEn
is set and the auto-baud has completed successfully).
The auto-baud interrupts have to be cleared by setting the corresponding U0ACR
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 U0DLM and U0DLL registers should be done
before U0ACR register write. The minimum and the maximum baud rates supported by
UART are function of UART_PCLK, number of data bits, stop bits and parity bits.
(2)
8
ABEOIntClr
End of auto-baud interrupt clear bit (write only
accessible).
0
0
Writing a 0 has no impact.
1
Writing a 1 will clear the corresponding interrupt in the
U0IIR.
9
ABTOIntClr
Auto-baud time-out interrupt clear bit (write only
accessible).
0
0
Writing a 0 has no impact.
1
Writing a 1 will clear the corresponding interrupt in the
U0IIR.
31:10 -
NA
Reserved, user software should not write ones to
reserved bits. The value read from a reserved bit is not
defined.
0
Table 83.
Auto-baud Control Register (U0ACR - address 0x4000 8020) bit description
Bit
Symbol
Value Description
Reset value