![GigaDevice Semiconductor GD32F20 Series User Manual Download Page 500](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f20-series/gd32f20-series_user-manual_2225801500.webp)
GD32F20x User Manual
500
if the pulse 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 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 19-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 submodule 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
divide 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 clock. The receiver decoder works in the same manner
as the normal IrDA mode.
19.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
reset in half-duplex communication mode.
In the half-duplex mode the receive line is internally connected to the TX pin, and the RX pin
is no longer used. The TX pin should be configured as output open drain mode. The software
should make sure the transmission and reception process never conflict each other.
19.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 external smart card through the CK pin after the CKEN bit is set.
The clock is divided from the PCLK. The divide ratio is configured by the PSC[4:0] bits in
USART_GP register. The CK pin only provides a clock source to the smart card.
The smartcard mode is a half-duplex communication protocol. When connected to a
smartcard, the TX pin must be configured as open drain and, an external pull-up resistor will
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 ...