![ARTERY AT32F435 Series Reference Manual Download Page 203](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592203.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 203
Rev 2.03
─
Parity error
12.2 Full-duplex/half-duplex selector
The full-duplex and half-duplex selector enables USART to perform data exchanges with peripherals in
full-duplex or half-duplex mode, which is achieved by setting the corresponding registers.
In two-wire unidirectional full-duplex mode (by default), TX pin is used for data output, while the RX pin
is used for data input. Since the transmitter and receiver are independent of each other, USART is
allowed to send/receive data at the same time so as to achieve full-duplex communication.
When the HALFSEL is set 1, the single-wire bidirectional half-duplex mode is selected for communication.
In this case, the LINEN, CLKEN, SCMEN and IRDAEN bits must be set 0. RX pin is inactive, while TX
and SW_RX are interconnected inside the USART. For the USART part, TX pins is used for data output,
and SW_RX for data input. For the peripheral part, bidirectional data transfer is executed through IO
mapped by TX pin.
12.3 Mode selector
12.3.1 Introduction
USART mode selector allows USART to work in different operation modes through software
configuration so as to enable data exchanges between USART and peripherals with different
communication protocols.
USART supports NRZ standard format (Mark/Space), by default. It also supports LIN (Local
Interconnection Network), IrDA SIR (Serial Infrared), Asynchronous Smartcard protocol in ISO7816-3
standard, RS-232 CTS/RTS (Clear To Send/Request To Send) hardware flow operation, silent mode and
synchronous mode, depending on USART mode selection configuration.
12.3.2 Configuration procedure
Selection of operation mode is done by following the configuration process listed below. In addition, such
configuration method, along with those of receiver and transmitter described in the subsequent sections,
are used to make USART initialization configuration.
1.
LIN mode:
Parameters configuration: LINEN=1, CLKEN=0, STOPBN[1: 0]=0, SCMEN=0, SLHDEN=0,
IRDAEN=0 and DBN[1: 0]=0.
LIN master has brake frame transmission capability, and thus it is able to send 13-bit low-level LIN
synchronous brake frame by setting SBF=1.
Similarly, LIN slave has brake frame detection capability, and thus it is able to detect 11-bit or 12-bit
brake fame, depending on whether BFBN=1 or BFBN=0.