GD32A50x User Manual
479
The idle frame wake up method is selected by default. If the RWU bit is reset, an idle frame
is detected on the RX pin, the IDLEF bit in LPUART_STAT will be set. If the RWU bit is set,
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[1:0] of in USART_CTL0 register is 0b01, the USART be waken up by address
match method. 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_DATA bits in the USART_CTL1 register, the hardware will clear the RWU bit
and exits the mute mode. The status bits are available in the USART_STAT register. If the
LSB 4 or 7 bits of an address frame defers from the ADDR_DATA 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.
When the WM[1:0] of in USART_CTL0 register is 0b1x, the USART be waken up by data
match method, in this situation, the ADDM bit must be set. If the data frame is the same as
the ADDR_DATA[7:0] 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.
In these situations, the RBNE bit is not set. If the frame defers from the ADDR_DATA 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 or data bit. When the USART will be
waken up by address match, if the ADDM bit is set and the receive frame is a 7bit data, the
LSB 6 bits will be compared with ADDR_DATA[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_DATA[7:0]. When the USART
will be waken up by data match, if the the receive frame is a 7bit data, the LSB 6 bits will be
compared with ADDR_DATA[5:0]. If the receive frame is a 9bit data, the LSB 8 bits will be
compared with ADDR_DATA[7:0].
Note:
If the MEN bit is set, the WM[1:0] bits is reset and the RWU bit is reset, an idle frame
is detected on the RX pin, the IDLEF bit will be set. If the RWU bit is set, the IDLEF is not set.
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] 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