UM10360 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2013. All rights reserved.
User manual Rev. 3 — 19 December 2013 310 of 841
NXP Semiconductors
UM10360
Chapter 14: LPC176x/5x UART0/2/3
14.4.10.1 Auto-baud
The UARTn 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 UnDLM and UnDLL
accordingly.
Remark: the fractional rate divider is not connected during auto-baud operations, and
therefore should not be used when the auto-baud feature is needed.
Auto-baud is started by setting the UnACR Start bit. Auto-baud can be stopped by clearing
the UnACR 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 UnACR
Mode bit. In mode 0 the baud-rate is measured on two subsequent falling edges of the
UARTn 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 UARTn Rx pin (the length of the start bit).
The UnACR 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 UARTn Rx pin.
The auto-baud function can generate two interrupts.
• The UnIIR ABTOInt interrupt will get set if the interrupt is enabled (UnIER ABToIntEn
is set and the auto-baud rate measurement counter overflows).
• The UnIIR ABEOInt interrupt will get set if the interrupt is enabled (UnIER ABEOIntEn
is set and the auto-baud has completed successfully).
The auto-baud interrupts have to be cleared by setting the corresponding UnACR
ABTOIntClr and ABEOIntEn bits.
Typically the fractional baud-rate generator is disabled (DIVADDVAL = 0) during
auto-baud. However, if the fractional baud-rate generator is enabled (DIVADDVAL > 0), it
is going to impact the measuring of UARTn Rx pin baud-rate, but the value of the UnFDR
register is not going to be modified after rate measurement. Also, when auto-baud is used,
any write to UnDLM and UnDLL registers should be done before UnACR register write.
The minimum and the maximum baud rates supported by UARTn are function of pclk,
number of data bits, stop bits and parity bits.
(3)
8 ABEOIntClr End of auto-baud interrupt clear bit (write-only accessible). Writing a 1 will
clear the corresponding interrupt in the UnIIR. Writing a 0 has no impact.
0
9 ABTOIntClr Auto-baud time-out interrupt clear bit (write-only accessible). Writing a 1 will
clear the corresponding interrupt in the UnIIR. Writing a 0 has no impact.
0
31:10 - Reserved, user software should not write ones to reserved bits. The value
read from a reserved bit is not defined.
NA
Table 282: UARTn Auto-baud Control Register (U0ACR - address 0x4000 C020, U2ACR - 0x4009 8020, U3ACR -
0x4009 C020) bit description …continued
Bit Symbol Value Description Reset value
ratemin
2P CLK
16 2
15
-------------------------
UARTn
baudrate
PCLK
16 2 databits paritybits stopbits++ +
------------------------------------------------------------------------------------------------------------
ratemax==