16.3.3.2 Clock Generation
The bit-rate in synchronous mode is given by
Figure 16.18 USART Synchronous Mode Bit Rate on page 468
. As in the case of asyn-
chronous operation, the clock division factor have a 15-bit integral part and a 5-bit fractional part.
br = f
HFPERCLK
/(2 x (1 + USARTn_CLKDIV/256))
Figure 16.18. USART Synchronous Mode Bit Rate
Given a desired baud rate brdesired, the clock divider USARTn_CLKDIV can be calculated using
Figure 16.19 USART Synchronous
Mode Clock Division Factor on page 468
USARTn_CLKDIV = 256 x (f
HFPERCLK
/(2 x brdesired) - 1)
Figure 16.19. USART Synchronous Mode Clock Division Factor
When the USART operates in master mode, the highest possible bit rate is half the peripheral clock rate. When operating in slave mode
however, the highest bit rate is an eighth of the peripheral clock:
• Master mode: br
max
= f
HFPERCLK
/2
• Slave mode: br
max
= f
HFPERCLK
/8
On every clock edge data on the data lines, MOSI and MISO, is either set up or sampled. When CLKPHA in USARTn_CTRL is cleared,
data is sampled on the leading clock edge and set-up is done on the trailing edge. If CLKPHA is set however, data is set-up on the
leading clock edge, and sampled on the trailing edge. In addition to this, the polarity of the clock signal can be changed by setting
CLKPOL in USARTn_CTRL, which also defines the idle state of the clock. This results in four different modes which are summarized in
Table 16.8 USART SPI Modes on page 468
Figure 16.20 USART SPI Timing on page 468
shows the resulting timing of data set-up
and sampling relative to the bus clock.
Table 16.8. USART SPI Modes
SPI mode
CLKPOL
CLKPHA
Leading edge
Trailing edge
0
0
0
Rising, sample
Falling, set-up
1
0
1
Rising, set-up
Falling, sample
2
1
0
Falling, sample
Rising, set-up
3
1
1
Falling, set-up
Rising, sample
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
USn_CLK
USn_CS
USn_TX/
USn_RX
CLKPOL = 0
CLKPOL = 1
CLKPHA = 0
CLKPHA = 1
X
X
X
X
Figure 16.20. USART SPI Timing
EFM32JG1 Reference Manual
USART - Universal Synchronous Asynchronous Receiver/Transmitter
silabs.com
| Smart. Connected. Energy-friendly.
Preliminary Rev. 0.6 | 468