GD32F10x User Manual
441
16.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.
16.3.12.
Smartcard (ISO7816-3) mode
The smartcard mode is an asynchronous mode, which is designed to support the ISO7816-3
protocol. 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
be needed, which drives a bidirectional line that is also driven by the smartcard. The data
frame consists of 1 start bit, 9 data bits (1 parity bit included) and 1.5 stop bits. The 0.5 stop
bit may be configured for a receiver.
Figure 16-15. ISO7816-3 frame format
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0.5 bit
1 bit
S
S
ISO 7816-3 frame without parity error
ISO 7816-3 frame with parity error
P
P
Character (T=0) mode
Comparing to the timing in normal operation, the transmission time from transmit shift register
to the TX pin is delayed by half baud clock, and the TC flag assertion time is delayed by a
guard time that is configured by the GUAT[7:0] bits in USART_GP. In smartcard mode, the
internal guard time counter starts count up after the stop bits of the last data frame, and the
GUAT[7:0] bits should be configured as the character guard time (CGT) in ISO7816-3 protocol
Содержание GD32F10 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F10x Arm Cortex M3 32 bit MCU User Manual Revision 2 6 Jun 2022 ...
Страница 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Страница 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Страница 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Страница 427: ...GD32F10x User Manual 427 value ...
Страница 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...