EasyManuals Logo

STMicroelectronics STM32F05 series User Manual

STMicroelectronics STM32F05 series
742 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #585 background imageLoading...
Page #585 background image
RM0091 Universal synchronous asynchronous receiver transmitter (USART)
Doc ID 018940 Rev 1 585/742
25.5.4 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 USART_BRR register.
Equation 1: Baud rate for standard USART (SPI mode included)
In case of oversampling by 16, the equation is:
In case of oversampling by 8, the equation is:
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, BRR = USARTDIV
When OVER8=1
BRR[2:0] = USARTDIV[3:0] shifted 1 bit to the right.
BRR3 must be kept cleared.
BRR[15:4] = USARTDIV[15:4]
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.
In case of oversampling by 16, USARTDIV must be greater than or equal to 16d.
In case of oversampling by 8, USARTDIV must be greater than or equal to 8d.
How to derive USARTDIV from USART_BRR register values when OVER8=0
Example 1
To obtain 9600 baud with f
CK
= 8 MHz.
In case of oversampling by 16:
USARTDIV = 8 000 000/9600
BRR[31:0] = USARTDIV = 833d = 0x0341
In case of oversampling by 8:
USARTDIV = 2 * 8 000 000/9600
USARTDIV = 1666,66 (1667d = 0x683)
BRR[3:0] = 0x3 << 1 = 0x1
BRR = 0x681
Tx/Rx baud
f
CK
USARTDIV
--------------------------------=
Tx/Rx baud
2f
CK
×
USARTDIV
--------------------------------=
Tx/Rx baud
f
CK
USARTDIV
--------------------------------=

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the STMicroelectronics STM32F05 series and is the answer not in the manual?

STMicroelectronics STM32F05 series Specifications

General IconGeneral
BrandSTMicroelectronics
ModelSTM32F05 series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals