...the world's most energy friendly microcontrollers
2014-07-02 - Gecko Family - d0001_Rev1.30
209
www.silabs.com
Asynchronous or synchronous mode can be selected by configuring SYNC in USARTn_CTRL. The
options are listed with supported protocols in Table 16.1 (p. 209) . Full duplex and half duplex
communication is supported in both asynchronous and synchronous mode.
Table 16.1. USART Asynchronous vs. Synchronous Mode
SYNC
Communication Mode
Supported Protocols
0
Asynchronous
RS-232, RS-485 (w/external driver), IrDA, ISO 7816
1
Synchronous
SPI, MicroWire, 3-wire
Table 16.2 (p. 209) explains the functionality of the different USART pins when the USART operates
in different modes. Pin functionality enclosed in square brackets is optional, and depends on additional
configuration parameters. LOOPBK and MASTER are discussed in Section 16.3.2.5 (p. 217) and
Section 16.3.3.3 (p. 225) respectively.
Table 16.2. USART Pin Usage
Pin functionality
SYNC
LOOPBK
MASTER
U(S)n_TX
(MOSI)
U(S)n_RX (MISO)
USn_CLK
USn_CS
0
0
x
Data out
Data in
-
[Driver enable]
1
1
x
Data out/in
-
-
[Driver enable]
1
0
0
Data in
Data out
Clock in
Slave select
1
0
1
Data out
Data in
Clock out
[Auto slave select]
1
1
0
Data out/in
-
Clock in
Slave select
1
1
1
Data out/in
-
Clock out
[Auto slave select]
16.3.2 Asynchronous Operation
16.3.2.1 Frame Format
The frame format used in asynchronous mode consists of a set of data bits in addition to bits for
synchronization and optionally a parity bit for error checking. A frame starts with one start-bit (S), where
the line is driven low for one bit-period. This signals the start of a frame, and is used for synchronization.
Following the start bit are 4 to 16 data bits and an optional parity bit. Finally, a number of stop-bits, where
the line is driven high, end the frame. An example frame is shown in Figure 16.2 (p. 209) .
Figure 16.2. USART Asynchronous Frame Format
S
0
1
2
3
4
[5]
[6]
[7]
[8]
[P]
St op
St art or idle
St op or idle
Fram e
The number of data bits in a frame is set by DATABITS in USARTn_FRAME, see Table 16.3 (p. 210)
, and the number of stop-bits is set by STOPBITS in USARTn_FRAME, see Table 16.4 (p. 210) .
Whether or not a parity bit should be included, and whether it should be even or odd is defined by
PARITY, also in USARTn_FRAME. For communication to be possible, all parties of an asynchronous
transfer must agree on the frame format being used.
Summary of Contents for EFM32G
Page 505: ......