![GigaDevice Semiconductor GD32A50 Series Скачать руководство пользователя страница 486](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32a50-series/gd32a50-series_user-manual_2225782486.webp)
GD32A50x User Manual
486
Figure 19-16. USART Receive FIFO structure
RX shift
register
RX Module
FIFO 0
FIFO 1
RX FIFO EN
RX Buffer
DMA
FIFO 2
FIFO 3
If the software read receive data buffer in the routing of the RBNE interrupt, the RBNEIE bit
should be reset at the beginning of the routing and set after all of the receive data is read out.
The PERR/NERR/FERR/EBF flags should be cleared before reading a receive data out.
19.3.15.
Wakeup from Deep-sleep mode
The USART is able to wake up the MCU from Deep-sleep mode by the standard RBNE
interrupt, the WUM interrupt or data match method.
The UESM bit must be set and the USART clock must be set to IRC16M or LXTAL (refer to
the reset and clock unit RCU section).
When using the standard RBNE interrupt, the RBNEIE bit must be set before entering Deep-
sleep mode.
When using the WUIE interrupt, the source of WUIE interrupt may be selected through the
WUM bit fields.
DMA must be disabled before entering Deep-sleep mode. Before entering Deep-sleep mode,
software must check that the USART is not performing a transfer, by checking the BSY flag
in the USART_STAT register. The REA bit must be checked to ensure the USART is actually
enabled.
When the wakeup event is detected, the WUF flag is set by hardware and a wakeup interrupt
is generated if the WUIE bit is set, independently of whether the MCU is in stop or active
mode.
19.3.16.
USART interrupts
The USART interrupt events and flags are listed in
Table 19-3. USART interrupt requests
Table 19-3. USART interrupt requests
Interrupt event
Event flag
Enable Control bit
Transmit data register empty
TBE
TBEIE
CTS flag
CTSF
CTSIE