![Geehy SEMICONDUCTOR APM32F405 Series User Manual Download Page 317](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630317.webp)
www.geehy.com Page 316
Functional description
Table 88 USAR Pin Description
Pin
Type
Description
USART_RX
Input
Data receiving
USART_TX
Output
I/O (single-line mode/smart
card mode)
Data transmission
It is high level by default when the
transmitter is enabled and does not transmit
data
USART_CK
Output
Clock output
USART_nRTS
Input
Request to send in hardware flow control
mode
USART_nCTS
Output
Clear to send in hardware flow control mode
IrDA_RDI
Input
Data input in IrDA mode
IrDA_TDO
Output
Data output in IrDA mode
Single-line half-duplex communication
HDEN bit of USART_CTRL3 register determines whether to enter the single-line
half-duplex mode.
When USART enters single-line half-duplex mode:
The CLKEN and LINMEN bit of USART_CTRL2 register, and IREN
and SCEN bits of USART_CTRL3 register must be cleared.
RX pin is disabled.
TX pin should be configured as open-drain output and connected with
RX pin inside the chip.
Transmitting data and receiving data can not be carried out at the
same time. The data cannot be received before they are sent. If
needing to receive data, enabling receiving can be turned on only
after TXCFLG bit of USART_STS register is set to 1.
If there is data collision on the bus, software management is needed
to allocate the communication process.
Frame format
The frame format of data frame is controlled by USART_CTRL1 register
DBLCFG bit controls the character length, which can be set to 8 or 9
bits.
PCEN bit controls to enable the check bit or not.
PCFG bit controls the parity bit to be odd or even.