SLAU847F October 2022 – March 2026 MSPM0L1105 , MSPM0L1106 , MSPM0L1116 , MSPM0L1116-Q1 , MSPM0L1117 , MSPM0L1227 , MSPM0L1227-Q1 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346 , MSPM0L2116 , MSPM0L2117 , MSPM0L2227 , MSPM0L2227-Q1 , MSPM0L2228 , MSPM0L2228-Q1
The baud-rate divisor is a 22-bit number consisting of a 16-bit integer, and a 6-bit fractional part. The number formed by these two values determines the bit sample period. The fractional baud-rate divisor allows the UART to accurately generate standard baud-rates.
The 16-bit integer is loaded into the UART Integer Baud-Rate Divisor UARTx.IBRD register, and the 6-bit fractional part is loaded into the UART Fractional Baud-Rate Divisor UARTx.FBRD register.
The baud-rate divisor can be calculated by using the following formula:
The UART clock is configured by CLKSEL and CLKDIV. Oversampling (by 16, 8 or 3) is selected by the HSE bit in the UARTx.CTL0 register.
The following example shows a simple method to calculate IBRD.DIVINT and FBRD.DIVFRAC for a baud rate of 19200 bit/s:
The UART.LCRH register must also be written when updating the baud-rate divisor (UARTx.IBRD or UARTx.IFRD). Changes to the baud-rate divisor must be followed by a write to the LCRH register for the changes to take effect.
The contents of the UART.IBRD and UART.FBRD registers are not updated until transmission or reception of the current character is complete.