Introduction
Correct USART communication requires the transmission and reception baud rates to be matched reasonably closely, otherwise communication errors may occur.
Automatic baud rate detection is useful when establishing a communication link between two devices, where the slave device is able to detect the baud rate of the master controller and self-adjust accordingly. This requires an automatic mechanism to determine the baud rate.
The USART peripheral embedded in some STM32 devices offers many features, including automatic baud rate detection hardware.
The purpose of this application note is to present the automatic baud rate detection feature of STM32 microcontrollers and to give an alternative software approach for STM32 devices that do not implement this feature in hardware.
This application note applies to the products listed in Table 1.
| Type | Product series |
|---|---|
| Microcontrollers | STM32C0 series, STM32C5 series, STM32F0 series, STM32F1 series, STM32F2 series, STM32F3 series, STM32F4 series, STM32F7 series, STM32H5 series, STM32H7 series, STM32L0 series, STM32L1 series, STM32L4 series, STM32L5 series, STM32G0 series, STM32G4 series, STM32N6 series, STM32U0 series, STM32U3 series, STM32U5 series, STM32WB series, STM32WB0 series, STM32WBA series, STM32WL series. |
