GD32F20x User Manual
497
address flag is low, the frame is treated as a data frame. If the LSB 4 bits of an address frame
are the same as the ADDR[3:0] bits in the USART_CTL1 register, the hardware clears the
RWU bit and exits the mute mode. The RBNE bit is set for the frame that wakes up the USART.
The status bits are available in the USART_STAT0 register. If the LSB 4 bits of an address
frame differs from the ADDR[3:0] bits in the USART_CTL1 register, the hardware sets the
RWU bit and enters mute mode automatically. In this situation, the RBNE bit is not set.
If the address match method is selected, the receiver does not check the parity value of an
address frame by default. If the PCEN bit in USART_CTL0 is set, the MSB bit will be checked
as the parity bit, and the bit preceding the MSB bit is detected as the address flag.
19.3.8.
LIN mode
The local interconnection network mode is enabled by setting the LMEN bit in USART_CTL1.
The CKEN, STB[1:0] bits in USART_CTL1 and the SCEN, HDEN, IREN bits in USART_CTL2
should be reset in LIN mode.
When transmitting a normal data frame, the transmission procedure is the same as the normal
USART mode.The data bits length can only be 8. When the SBKCMD bit in USART_CTL0 is
set, the USART transmits continuous 13
‘0’ bits, following by 1 stop bit.
The break detection function is totally independent from the normal USART receiver. So a
break frame can be detected during the idle state or during a frame. The expected length of
a break frame can be selected by LBLEN in USART_CTL1. When the RX pin is detected at
low state for a time that is equal to or longer than the expected break frame length (10 bits
when LBLEN=0, or 11 bits when LBLEN=1), the LBDF in USART_STAT0 is set. An interrupt
occurs if the LBDIE bit in USART_CTL1 is set.
Figure 19-9. Break frame occurs during idle state
, if a break frame occurs
during the idle state on the RX pin, the USART receiver will receive an all
‘0’ frame, with an
asserted FERR status.
Figure 19-9. Break frame occurs during idle state
frame0
frame1
frame2
1 frame time
USART_DATA
data0
data1
00000000
data2
FERR
RX pin
LBDF
As shown in
Figure 19-10. Break frame occurs during a frame
, if a break frame occurs
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...