31.3.4.1 8-bit, 9-bit and 10-bit data modes
The UART system, transmitter and receiver, can be configured to operate in 9-bit data
mode by setting the UART_C1[M] or 10-bit data mode by setting UART_C4[M10]. In 9-
bit mode, there is a ninth data bit to the left of the msb of the UART data register, in 10-
bit mode there is a tenth data bit. For the transmit data buffer, these bits are stored in T8
and T9 in UART_C3. For the receiver, these bits are held in UART_C3[R8] and
UART_C3[R9].
For coherent writes to the transmit data buffer, write to UART_C3[T8] and
UART_C3[T9] before writing to UART_D.
If the bit values to be transmitted as the ninth and tenth bit of a new character are the
same as for the previous character, it is not necessary to write to T8 and T9 again. When
data is transferred from the transmit data buffer to the transmit shifter, the value in T8
and T9 is copied at the same time data is transferred from UART_D to the shifter.
The 9-bit data mode is typically used with parity to allow eight bits of data plus the parity
in the ninth bit, or it is used with address-mark wakeup so the ninth data bit can serve as
the wakeup bit. The 10-bit data mode is typically used with parity and address-mark
wakeup so the ninth data bit can serve as the wakeup bit and the tenth bit as the parity bit.
In custom protocols, the ninth and/or tenth bits can also serve as software-controlled
markers.
31.3.4.2 Loop mode
When UART_C1[LOOPS] is set, the UART_C1[RSRC] bit in the same register chooses
between loop mode (UART_C1[RSRC] = 0) or single-wire mode (UART_C1[RSRC] =
1). Loop mode is sometimes used to check software, independent of connections in the
external system, to help isolate system problems. In this mode, the transmitter output is
internally connected to the receiver input and the UART_RX pin is not used by the
UART.
31.3.4.3 Single-wire operation
When UART_C1[LOOPS] is set, the RSRC bit in the same register chooses between
loop mode (UART_C1[RSRC] = 0) or single-wire mode (UART_C1[RSRC] = 1).
Single-wire mode implements a half-duplex serial connection. The receiver is internally
connected to the transmitter output and to the UART_TX pin (the UART_RX pin is not
used).
Functional description
KL02 Sub-Family Reference Manual, Rev. 2.1, July 2013
518
Freescale Semiconductor, Inc.