GD32F403xx User Manual
411
bit may be configured for a receiver.
Figure 17-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 counting 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 minus 12. The TC status is forced reset while the guard time counter is counting up.
When the counter reaches the programmed value TC is asserted high.
During USART transmission, if a parity error event is detected, the smartcard may NACK the
current frame by pulling down the TX pin during the last 1 bit time of the stop bits. The USART
can automatically resend data according to the protocol for SCRTNUM times. An interframe
gap of 2.5 bits time will be inserted before the start of a resented frame. At the end of the last
repeated character the TC bit is set immediately without guard time. The USART will stop
transmitting and assert the framing error status if it still receives the NACK signal after the
programmed number of retries. The USART will not take the NACK signal as the start bit.
During USART reception, if the parity error is detected in the current frame, the TX pin is
pulled low during the last 1 bit time of the stop bits. This signal is the NACK signal to smartcard.
Then a frame error occurs in smartcard side. The RBNE/receive DMA request is not activated
if the received character is erroneous. According to the protocol, the smartcard can resend
the data. The USART stops transmitting the NACK and the error is regarded as a parity error
if the received character is still erroneous after the maximum number of retries which is
specified in the SCRTNUM bit field. The NACK signal is enabled by setting the NKEN bit in
USART_CTL2.
The idle frame and break frame are not supported in the Smartcard mode.
Block (T=1) mode
In block (T=1) mode, the NKEN bit in the USART_CTL2 register should be cleared to
deactivate the NACK transmission.
When requesting a read from the smartcard, the RT[23:0] bits in USART_RT register should
be programmed with the BWT (block wait time) - 11 value and RBNEIE must be set. This
Содержание GD32F403 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F403xx Arm Cortex M4 32 bit MCU User Manual Revision 2 6 Jul 2022 ...
Страница 177: ...GD32F403xx UserManual 177 Peripheral Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 SDIO SDIO ...
Страница 217: ...GD32F403xx UserManual 217 ensures that no conversion is in progress ...