![ARTERY AT32F435 Series Скачать руководство пользователя страница 211](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592211.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 211
Rev 2.03
Figure 12-2 TDC/TDBE behavior when transmitting
TDBE
USART_DT
DATA0
DATA1
DATA2
TX pin
TDC
TEN
Set by hardware
Set by hardware
Set by hardware
Set by hardware
Cleared by software
Idle frame
frame0
frame1
frame2
12.8 Receiver
12.8.1 Receiver introduction
USART receiver has its individual REN control bit (bit 2 in the USART_CTRL1 register). The
transmitter and receiver share the same baud rate that is programmable. There is a receive data buffer
(RDR) and a receive shift register in the USART.
The data is input on the RX pin of the USART. When a valid start bit is detected, the receiver ports the
data received into the receive shift register in LSB mode. After a full data frame is received, based on
the programmed frame format, it will be moved from the receive shift register to the receive data buffer,
and the RDBF is set accordingly. An interrupt is generated if the RDBFIEN is set.
If hardware flow control is selected, the control signal is output on the RTS pin.
During data reception, the USART receiver will detect whether there are errors to occur, including
framing error, overrun error, parity check error or noise error, depending on software configuration, and
whether there are interrupts to generate using the interrupt enable bits.
12.8.2 Receiver configuration
Configuration procedure:
1. USART enable: UEN bit is set.
2. Full-
duplex/half-duplex configuration: Refer to
12.2 Full-duplex/half-duplex selector
3. Mode
configuration: Refer to
4. F
rame format configuration: Refer to
12.4 USART frame format and configuration
5. In
terrupt configuration: Refer to
6. Reception using DMA:
If the DMA mode is selected, the DMAREN bit is set, and configure DMA
register accordingly.
7. Baud
rate configuration: Refer to
8. Receiver
enable: REN bit is set.
Character reception:
The RDBF bit is set. It indicates that the content of the shift register is transferred to the RDR
(Receiver Data Register). In other words, data is received and can be read (including its
associated error flags)
An interrupt is generated when the RDBFIEN is set.