Texas Instruments MSP430x1xx User Manual
Page 232
Control and Status Registers
12-16
12.5.1 USART Control Register UCTL
The information stored in the USART control register (UCTL), shown in
Figure 12–16, determines the basic operation of the USART module. The
register bits select the communications protocol, communication format, and
parity bit. All bits must be programmed according to the selected mode before
resetting the SWRST bit to disable the reset.
Figure 12–16. USART Control Register UCTL
7
0
rw–0
UCTL0, 070h
UCTL1, 078h
SP
PEV
CHAR
MM
SWRST
Listen
rw–0
rw–0
rw–0
rw–0
rw–0
rw–1
PENA
SYNC
rw–0
Bit 0:
The USART state machines and operating flags are initialized
to the reset condition (URXIFG = URXIE = UTXIE = 0, UTXIFG
= 1) if the software reset bit is set. Until the SWRST bit is reset,
all affected logic is held in the reset state. This implies that after
a system reset the USART must be reenabled by resetting this
bit. The receive and transmit enable flags URXE and UTXE are
not altered by SWRST.
The SWRST bit resets the following bits and flags: URXIE,
UTXIE, URXIFG, RXWAKE, TXWAKE, RXERR, BRK, PE, OE,
and FE
The SWRST bit sets the following bits: UTXIFG, TXEPT
Bit 1:
Multiprocessor mode (address/idle-line wake up)
Two multiprocessor protocols, idle-line and address-bit, are
supported by the USART module. The choice of multiprocessor
mode affects the operation of the automatic address decoding
functions.
MM = 0: Idle-line multiprocessor protocol
MM = 1: Address-bit multiprocessor protocol
The conventional asynchronous protocol uses MM-bit reset.
Bit 2:
Mode or function of USART module selected
The SYNC bit selects the function of the USART peripheral
interface module. Some of the USART control bits have different
functions in UART and SPI mode.
SYNC = 0: UART function is selected
SYNC = 1: SPI function is selected
Bit 3:
The listen bit selects if the transmitted data is fed back internally
to the receiver.
Listen = 0: No feedback
Listen = 1: Transmit signal is internally fed back to the receiver.
This is commonly known as loopback mode.
Bit 4:
Character length
This register bit selects the length of the character to be
transmitted as either 7 or 8 bits. 7-bit characters do not use the
eighth bit in URXBUF and UTXBUF. This bit is padded with
0.