
eUSCI_A Operation – UART Mode
18.3.10 Setting a Baud Rate
For a given BRCLK clock source, the baud rate used determines the required division factor N:
N = f
BRCLK
/Baudrate
The division factor N is often a noninteger value, thus, at least one divider and one modulator stage is
used to meet the factor as closely as possible.
If N is equal or greater than 16, it is recommended to use the oversampling baud-rate generation mode by
setting UCOS16.
NOTE:
Baudrate settings quick set up
To calculate the correct the correct settings for the baudrate generation, perform these steps:
1.
Calculate N = f
BRCLK
/Baudrate
[if N > 16 continue with step 3, otherwise with step 2]
2.
OS16 = 0, UCBRx = INT(N)
[continue with step 4]
3.
OS16 = 1, UCBRx = INT(N/16), UCBRFx = INT([(N/16) – INT(N/16)] × 16)
4.
UCBRSx can be found by looking up the fractional part of N ( = N - INT(N) ) in table
5.
If OS16 = 0 was chosen, a detailed error calculation is recommended to be performed
can be used as a lookup table for finding the correct UCBRSx modulation pattern for the
corresponding fractional part of N. The values there are optimized for transmitting.
Table 18-4. UCBRSx Settings for Fractional Portion of N = f
BRCLK
/Baudrate
Fractional Portion of N
UCBRSx
(1)
Fractional Portion of N
UCBRSx
(1)
0.0000
0x00
0.5002
0xAA
0.0529
0x01
0.5715
0x6B
0.0715
0x02
0.6003
0xAD
0.0835
0x04
0.6254
0xB5
0.1001
0x08
0.6432
0xB6
0.1252
0x10
0.6667
0xD6
0.1430
0x20
0.7001
0xB7
0.1670
0x11
0.7147
0xBB
0.2147
0x21
0.7503
0xDD
0.2224
0x22
0.7861
0xED
0.2503
0x44
0.8004
0xEE
0.3000
0x25
0.8333
0xBF
0.3335
0x49
0.8464
0xDF
0.3575
0x4A
0.8572
0xEF
0.3753
0x52
0.8751
0xF7
0.4003
0x92
0.9004
0xFB
0.4286
0x53
0.9170
0xFD
0.4378
0x55
0.9288
0xFE
(1)
The UCBRSx setting in one row is valid from the fractional portion given in that row until the one in the next row
18.3.10.1 Low-Frequency Baud-Rate Mode Setting
In low-frequency mode, the integer portion of the divisor is realized by the prescaler:
UCBRx = INT(N)
The fractional portion is realized by the modulator with its UCBRSx setting. The recommended way of
determining the correct UCBRSx is performing a detailed error calculation as explained in the following
sections. However it is also possible to look up the correct settings in table with typical crystals (see
).
488
Enhanced Universal Serial Communication Interface (eUSCI) – UART Mode
SLAU272C – May 2011 – Revised November 2013
Copyright © 2011–2013, Texas Instruments Incorporated