GD32F3x0 User Manual
463
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.
18.3.16. USART interrupts
The USART interrupt events and flags are listed in Table 18-3. USART interrupt requests.
Table 18-3. USART interrupt requests
Reception errors (noise flag,
overrun error, framing error) in
DMA reception
All of the interrupt events are ORed together before being sent to the interrupt controller, so
the USART can only generate a single interrupt request to the controller at any given time.
Software can service multiple interrupt events in a single interrupt service routine.