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 #588 background imageLoading...
Page #588 background image
Universal synchronous asynchronous receiver transmitter (USART) RM0091
588/742 Doc ID 018940 Rev 1
Note: The data specified in Ta bl e 8 6 and Ta ble 87 may slightly differ in the special case when the
received frames contain some Idle frames of exactly 10-bit times when M=0 (11-bit times
when M=1).
25.5.6 Auto baud rate detection
The USART is able to detect and automatically set the USART_BRR register value based
on the reception of one character. Automatic baud rate detection is useful under two
circumstances:
The communication speed of the system is not known in advance
The system is using a relatively low accuracy clock source and this mechanism allows
the correct baud rate to be obtained without measuring the clock deviation
The clock source frequency must be compatible with the expected communication speed
(oversampling by 16 selected and baudrate between f
CK
/65535 and f
CK
/16).
Before activating the auto baud rate detection, the character pattern must be chosen. There
are two possible character patterns, which can be chosen through the ABRMOD[1:0] field in
the USART_CR2 register. These patterns are:
1. Any character starting with a bit at 1. In this case the USART will measure the duration
of the Start bit (falling edge to rising edge).
2. Any character starting with a 10xx bit pattern. In this case, the USART will measure the
duration of the Start and of the 1st data bit. The measure is done falling edge to falling
edge, ensuring a better accuracy in the case of slow signal slopes.
In addition, prior to activating auto baud rate detection, the USART_BRR register must be
initialized by writing a non-zero baud rate value.
The automatic baud rate detection is activated by setting the ABREN bit in the USART_CR2
register. The USART will then wait for the first character on the RX line. The auto baud rate
operation completion is indicated by the setting of the ABRF flag in the USART_ISR register.
If the line is noisy, the correct baud rate detection cannot be guaranteed. In this case the
BRR value may be corrupted and/or the ABRE error flag may be set. This also happens if
the communication speed is not compatible with the automatic baud rate detection range
(bit duration not between 16 to 65536 clock periods).
The RXNE interrupt will signal the end of the operation.
At any later time, the auto baud rate detection may be relaunched by resetting the ABRF
flag (by writing a 0).
If the USART is disabled (UE=0) during an auto baud rate operation, the BRR value may be
corrupted.
Table 87. Tolerance of the USART receiver when BRR[3:0]
is different from 0000
M bit
OVER8 bit = 0 OVER8 bit = 1
ONEBIT=0 ONEBIT=1 ONEBIT=0 ONEBIT=1
0 3.33% 3.88% 2% 3%
1 3.03% 3.53% 1.82% 2.73%

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