GD32W51x User Manual
602
width is less than 1 PSC clock. While it can detect a pulse by chance if the pulse width is
greater than 1 but smaller than 2 times of PSC clock.
Because the IrDA is a half-duplex protocol, the transmission and the reception should not be
carried out at the same time in the IrDA SIR ENDEC block.
Figure 18-14. IrDA data modulation
Normal
tx frame
Stop
Start
1
0
0
0
0
0
0
1
1
1
1
Stop
Start
1
0
1
1
1
1
0
0
0
0
0
TX pin
Normal rx
frame
RX pin
The SIR sub module can work in low power mode by setting the IRLP bit in USART_CTL2.
The transmit encoder is driven by a low speed clock, which is divided from the PCLK. The
division ratio is configured by the PSC[7:0] bits in USART_GP register. The pulse width on
the TX pin is 3 cycles of this low speed period. The receiver decoder works in the same
manner as the normal IrDA mode.
18.3.11.
Half-duplex communication mode
The half-duplex communication mode is enabled by setting the HDEN bit in USART_CTL2.
The LMEN, CKEN bits in USART_CTL1 and SCEN, IREN bits in USART_CTL2 should be
cleared in half-duplex communication mode.
Only one wire is used in half-duplex mode. The TX and RX pins are connected together
internally. The TX pin should be configured as IO pin. The conflicts should be controlled by
the software. When the TEN bit is set, the data in the data register will be sent.
18.3.12.
Smartcard (ISO7816-3) mode
The smartcard mode is an asynchronous mode, which is designed to support the ISO7816-3
protocol. Both the character (T=0) mode and the block (T=1) mode are supported. The
smartcard mode is enabled by setting the SCEN bit in USART_CTL2. The LMEN bit in
USART_CTL1 and HDEN, IREN bits in USART_CTL2 should be reset in smartcard mode.
A clock is provided to the smartcard if the CKEN bit is set. The clock can be divided for other
use.
The frame consists of 1 start bit, 9 data bits (1 parity bit included) and 1.5 stop bits.
The smartcard mode is a half-duplex communication protocol. When connected to a