Usart Synchronous Mode; Figure 238. Break Detection In Lin Mode Vs. Framing Error Detection - STMicroelectronics STM32F05 series Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

Universal synchronous asynchronous receiver transmitter (USART)

Figure 238. Break detection in LIN mode vs. Framing error detection

In these examples, we suppose that LBDL=1 (11-bit break length), M=0 (8-bit data)
Case 1: break occurring after an Idle
RX line
RXNE / FE
Case 1: break occurring while data is being received
RX line
RXNE / FE
25.5.11

USART synchronous mode

The synchronous mode is selected by writing the CLKEN bit in the USART_CR2 register to
1. In synchronous mode, the following bits must be kept cleared:
LINEN bit in the USART_CR2 register,
SCEN, HDSEL and IREN bits in the USART_CR3 register.
In this mode, the USART can be used to control bidirectional synchronous serial
communications in master mode. The SCLK pin is the output of the USART transmitter
clock. No clock pulses are sent to the SCLK pin during start bit and stop bit. Depending on
the state of the LBCL bit in the USART_CR2 register, clock pulses are, or are not, generated
during the last valid data bit (address mark). The CPOL bit in the USART_CR2 register is
used to select the clock polarity, and the CPHA bit in the USART_CR2 register is used to
select the phase of the external clock (see
During the Idle state, preamble and send break, the external SCLK clock is not activated.
In synchronous mode the USART transmitter works exactly like in asynchronous mode. But
as SCLK is synchronized with TX (according to CPOL and CPHA), the data on TX is
synchronous.
In this mode the USART receiver works in a different manner compared to the
asynchronous mode. If RE=1, the data is sampled on SCLK (rising or falling edge,
depending on CPOL and CPHA), without any oversampling. A setup and a hold time must
be respected (which depends on the baud rate: 1/16 bit time).
Note:
The SCLK pin works in conjunction with the TX pin. Thus, the clock is provided only if the
transmitter is enabled (TE=1) and data is being transmitted (the data register USART_DR
written). This means that it is not possible to receive synchronous data without transmitting
data.
The LBCL, CPOL and CPHA bits have to be selected when the USART is disabled (UE=0)
to ensure that the clock pulses function correctly.
594/742
data 1
IDLE
LBDF
data 1
data 2
1 data time
LBDF
Doc ID 018940 Rev 1
BREAK
1 data time
BREAK
Figure
239,
Figure 240
RM0091
data2 (0x55)
data 3 (header)
1 data time
data2 (0x55)
data 3 (header)
1 data time
&
Figure
241).

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

Table of Contents