Automatic baud rate detection modes
ABR refers to the process by which a receiving device determines the speed of incoming data by examining the first character, usually a preselected sign-on character.
The automatic baud rate feature on STM32 products embeds various modes based on different character patterns:
- Any character starting with a bit at ‘1’: Mode 0
- Any character starting with a 10xx pattern: Mode 1
- 0x7F: Mode 2
- 0x55: Mode 3
| ABR mode | Description | Waveform |
| 0 |
The received character can be a character starting with a bit at 1. In this case, the USART measures the duration of the start bit (falling edge to rising edge). |
![]() |
| 1 |
Any character starting with a 10xx pattern. In this case, the USART measures the duration of the start and of the first data bit. The duration is measured from falling edge to falling edge, ensuring better accuracy in the case of slow signal slopes. |
![]() |
| 2 |
0x7F character frame. In this case, the baud rate is updated first at the end of the start bit then at the end of the bit 6. |
![]() |
| 3 |
A 0x55 character frame. In this case, the baud rate is updated first at the end of the start bit, then at the end of bit and finally at the end of bit 6. In parallel, another check is performed for each intermediate transition of the RX line. |
![]() |
Before activating the automatic baud rate detection, one of the ABR modes must be selected through the ABRMOD[1:0] field in the USARTx_CR2 register. In all ABR modes, the baud rate is measured several times during the synchronization data reception, and is compared each time to the previous measurement.
In 7-bit data length mode, 0x7F and 0x55 frames detection ABR modes are not supported.




