GD32W51x User Manual
599
The idle frame wake up method is selected by default. When an idle frame is detected on the
RX pin, the hardware clears the RWU bit and exits the mute mode. When it is woken up by
an idle frame, the IDLEF bit in USART_STAT will not be set.
When the WM bit of in USART_CTL0 register is set, the MSB bit of a frame is detected as the
address flag. If the address flag is high, the frame is treated as an address frame. If the
address flag is low, the frame is treated as a data frame. If the LSB 4 or 7 bits, which are
configured by the ADDM bit of the USART_CTL1 register, of an address frame is the same
as the ADDR bits in the USART_CTL1 register, the hardware will clear the RWU bit and exits
the mute mode. The RBNE bit will be set when the frame that wakes up the USART. The
status bits are available in the USART_STAT register. If the LSB 4/7 bits of an address frame
defers from the ADDR 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 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 bit. If the ADDM bit is set and the receive
frame is a 7bit data, the LSB 6 bits will be compared with ADDR[5:0]. If the ADDM bit is set
and the receive frame is a 9bit data, the LSB 8 bits will be compared with ADDR[7:0].
18.3.8.
LIN mode
The local interconnection network mode is enabled by setting the LMEN bit in USART_CTL1.
The CKEN, STB[1:0] bit in USART_CTL1 and the SCEN, HDEN, IREN bits in USART_CTL2
should be cleared 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. And the break frame is 13-
bit ’0’, followed
by 1 stop bit.
The break detection function is totally independent of 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 configuring 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 bit in USART_STAT is set. An interrupt
occurs if the LBDIE bit in USART_CTL1 is set.
Figure 18-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 18-9. Break frame occurs during idle state
frame0
frame1
frame2
1 frame time
USART_RDATA
data0
data1
00000000
data2
FERR
RX pin
LBDF