Fractional Baud Rate Generation - ST STM32F423 Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F423:
Table of Contents

Advertisement

RM0430
Universal synchronous receiver transmitter (USART) /universal asynchronous receiver
be set. The second stop bit is not checked for framing error. The RXNE flag will be set
at the end of the first stop bit.
28.4.4

Fractional baud rate generation

The baud rate for the receiver and transmitter (Rx and Tx) are both set to the same value as
programmed in the Mantissa and Fraction values of USARTDIV.
Equation 1: Baud rate for standard USART (SPI mode included)
Equation 2: Baud rate in Smartcard, LIN and IrDA modes
USARTDIV is an unsigned fixed point number that is coded on the USART_BRR register.
When OVER8=0, the fractional part is coded on 4 bits and programmed by the
DIV_fraction[3:0] bits in the USART_BRR register
When OVER8=1, the fractional part is coded on 3 bits and programmed by the
DIV_fraction[2:0] bits in the USART_BRR register, and bit DIV_fraction[3] must be kept
cleared.
Note:
The baud counters are updated to the new value in the baud registers after a write operation
to USART_BRR. Hence the baud rate register value should not be changed during
communication.
How to derive USARTDIV from USART_BRR register values when OVER8=0
Example 1:
If DIV_Mantissa = 0d27 and DIV_Fraction = 0d12 (USART_BRR = 0x1BC), then
Mantissa (USARTDIV) = 0d27
Fraction (USARTDIV) = 12/16 = 0d0.75
Therefore USARTDIV = 0d27.75
Example 2:
To program USARTDIV = 0d25.62
This leads to:
DIV_Fraction = 16*0d0.62 = 0d9.92
The nearest real number is 0d10 = 0xA
DIV_Mantissa = mantissa (0d25.620) = 0d25 = 0x19
Then, USART_BRR = 0x19A hence USARTDIV = 0d25.625
Example 3:
To program USARTDIV = 0d50.99
------------------------------------------------------------------------------------ -
Tx/Rx baud
=
×
(
8
2 OVER8
----------------------------------------------
Tx/Rx baud
=
16
RM0430 Rev 8
f
CK
)
×
USARTDIV
f
CK
×
USARTDIV
897/1324
934

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F423 and is the answer not in the manual?

Questions and answers

Table of Contents