![GigaDevice Semiconductor GD32E23 Series Скачать руководство пользователя страница 435](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794435.webp)
GD32E23x User Manual
435
(NERR) status will be generated for the frame. An interrupt will be generated, If the receive
DMA is enabled and the ERRIE bit in USART_CTL2 register is set. If the OSB bit in
USART_CTL2 register is set, the receiver gets only one sample to evaluate a bit value. In
this situation, no noisy error will be detected.
Figure 16-4.Oversampling method of a receive frame bit (OSB=0)
0
1
2
3
4
5
6
7
0
2
4
6
8
10
12
14
1
3
5
7
9
11
13
15
one frame bit
sample bits
sample bits
oversampling
8 mode
oversampling
16 mode
RX pin
If the parity check function is enabled by setting the PCEN bit in the USART_CTL0 register,
the receiver calculates the expected parity value while receiving a frame. The received parity
bit will be compared with this expected value. If they are not the same, the parity error
(PERR) bit in USART_STAT register will be set. An interrupt is generated, if the PERRIE bit
in USART_CTL0 register is set.
If the RX pin is evaluated as 0 during a stop bit, the frame error (FERR) bit in USART_STAT
register will be set. An interrupt is generated, If the receive DMA is enabled and the ERRIE
bit in USART_CTL2 register is set.
When a frame is received, if the RBNE bit is not cleared yet, the last frame will not be stored
in the receive data buffer. The overrun error (ORERR) bit in USART_STAT register will be set.
An interrupt is generated, if the receive DMA is enabled and the ERRIE bit in USART_CTL2
register is set, or if the RBNEIE is set.
If a noise error (NERR), parity error (PERR), frame error (FERR) or overrun error (ORERR)
occurs during reception, NERR, PERR, FERR or ORERR will be set at the same time with
RBNE. If the receive DMA is not enabled, when the RBNE interrupt occurs, software need to
check whether there is a noise error, parity error, frame error or overrun error.
16.3.5.
Use DMA for data buffer access
To reduce the burden of the processor, DMA can be used to access the transmitting and
receiving data buffer. The DENT bit in USART_CTL2 is used to enable the DMA transmission,
and the DENR bit in USART_CTL2 is used to enable the DMA reception.
When DMA is used for USART transmission, DMA transfers data from internal SRAM to the
transmit data buffer of the USART. The configuration step are shown in