STM32 UART Lecture 5 – Synchronization bits

  • Post author:
  • Post category:Blog

 

Synchronization bits

 

 

Synchronization Bits in Serial Communication

The synchronization bits are two or three special bits transferred with each chunk of data.

They are the start bit and the stop bits.

These bits mark the beginning and end of a packet (Figure 1).

There is always only one start bit, but the number of stop bits is configurable to either 1 or 2.

Synchronization bits
Figure 1. Transfer of synchronization bit with each chunk of data.

 

In the STM32F4xx microcontroller, you can even choose 105 stop bits. That means one-and-a-half-bit duration. The stop bit in the register USART control register 2 (Figure 2) selects the number of stop bits to be inserted by the transmitter. Typically, we use one stop bit in most of the applications but if your baud rate is very high, say in terms of megabits per second, then you may think of inserting two stop bits.

Synchronization bits
Figure 2. USART control register 2 (USART_CR2)

 

The start bit is always indicated by an idle data line (Figure 3) going from high to low. While the stop bit will transition back to the idle state by holding the line at high.

Synchronization bits
Figure 3. Start and stop bits.

 

In the following article, let’s see UART Parity. 

 

FastBit Embedded Brain Academy Courses

Click here: https://fastbitlab.com/course1

 

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.