
Rev. 1.00
479 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
22 Universal Synchronous
Asynchronous Receiver T
ransmitter (USART)
22 Universal Synchronous
Asynchronous Receiver T
ransmitter (USART)
Interrupts and Status
The USART can generate interrupts when the following events occur and the corresponding
interrupt enable bits are set:
▆
Receive FIFO time-out interrupt: An interrupt is generated when the USART receive FIFO is not
empty and does not receive a new data package during the specified time-out interval.
▆
Receiver line status interrupts: The interrupts are generated when the USART receiver overrun
error, parity error, framing error and break events occur.
▆
Transmit FIFO threshold level interrupt: An interrupt is generated when the data to be transmitted
in the USART Transmit FIFO is less than the specified threshold level.
▆
Transmit complete interrupt: An interrupt is generated when the Transmit FIFO is empty and the
content of the transmit shift register (TSR) is also completely shifted.
▆
Receive FIFO threshold level interrupt: An interrupt is generated when the FIFO received data
amount has reached the specified threshold level.
PDMA Interface (HT32F54243/HT32F54253 only)
The PDMA interface is integrated in the USART. The PDMA function can be enabled by setting
the TXDMAEN or RXDMAEN bit in the USRCR register to 1 in the transmit or receive mode
respectively. When the data to be transmitted in the USART Transmit FIFO is less than the TX
FIFO threshold level specified by the TXTL field in the USRFCR register and the TXDMAEN
bit is set to 1, the PDMA function will be activated to move data from a source location into the
USART TX FIFO.
Similarly, when the received data amount in the receive FIFO is equal to the RX FIFO threshold
level specified by the RXTL field in the USRFCR register and the RXDMAEN bit is set to 1, the
PDMA function will be activated to move data from the USART RX FIFO to a specific destination
location. For a more detailed description about the PDMA configurations, refer to the PDMA
chapter.
Register Map
The following table shows the USART registers and reset values. The PDMA related describes are
only available for the HT32F54243/HT32F54253 devices.
Table 57. USART Register Map
Register
Offset
Description
Reset Value
USRDR
0x000
USART Data Register
0x0000_0000
USRCR
0x004
USART Control Register
0x0000_0000
USRFCR
0x008
USART FIFO Control Register
0x0000_0000
USRIER
0x00C
USART Interrupt Enable Register
0x0000_0000
USRSIFR
0x010
USART Status & Interrupt Flag Register
0x0000_0980
USRTPR
0x014
USART Timing Parameter Register
0x0000_0000
IrDACR
0x018
USART IrDA Control Register
0x0000_0000
RS485CR
0x01C
USART RS485 Control Register
0x0000_0000
SYNCR
0x020
USART Synchronous Control Register
0x0000_0000
USRDLR
0x024
USART Divider Latch Register
0x0000_0010
USRTSTR
0x028
USART Test Register
0x0000_0000