Figure 281. Tc/Txe Behavior When Transmitting - ST STM32F101 series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F101 series:
Table of Contents

Advertisement

RM0008
When a transmission is taking place, a write instruction to the USART_DR register stores
the data in the TDR register and which is copied in the shift register at the end of the current
transmission.
When no transmission is taking place, a write instruction to the USART_DR register places
the data directly in the shift register, the data transmission starts, and the TXE bit is
immediately set.
If a frame is transmitted (after the stop bit) and the TXE bit is set, the TC bit goes high. An
interrupt is generated if the TCIE bit is set in the USART_CR1 register.
After writing the last data into the USART_DR register, it is mandatory to wait for TC=1
before disabling the USART or causing the microcontroller to enter the low-power mode
(see
Figure 281: TC/TXE behavior when
The TC bit is cleared by the following software sequence:
1.
A read from the USART_SR register
2.
A write to the USART_DR register
Note:
The TC bit can also be cleared by writing a '0' to it. This clearing sequence is recommended
only for Multibuffer communication.
Idle preamble
TX line
TXE flag
USART_DR
F1
TC flag
software
software waits until TXE=1
enables the
and writes F2 into DR
USART
software waits until TXE=1
and writes F1 into DR
Break characters
Setting the SBK bit transmits a break character. The break frame length depends on the M
bit (see
Figure
If the SBK bit is set to '1' a break character is sent on the TX line after completing the current
character transmission. This bit is reset by hardware when the break character is completed
(during the stop bit of the break character). The USART inserts a logic 1 bit at the end of the
last break frame to guarantee the recognition of the start bit of the next frame.
Note:
If the software resets the SBK bit before the commencement of break transmission, the
break character will not be transmitted. For two consecutive breaks, the SBK bit should be
set after the stop bit of the previous break.
Idle characters
Setting the TE bit drives the USART to send an idle frame before the first data frame.
Universal synchronous asynchronous receiver transmitter (USART)

Figure 281. TC/TXE behavior when transmitting

Frame 1
set by hardware
cleared by software
F2
TC is not set
because TXE=0
software waits until TXE=1
and writes F3 into DR
279).
DocID13902 Rev 15
transmitting).
Frame 2
set by hardware
cleared by software
F3
TC is not set
because TXE=0
software waits until TC=1
Frame 3
set by hardware
TC is set because
TXE=1
set
by hardware
ai17121b
786/1128
820

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Stm32f107 seriesStm32f102 seriesStm32f103 seriesStm32f105 seriesStm32f101 series

Table of Contents