Atmel ARM-Based Evaluation Kit AT91SAM9N12-EK AT91SAM9N12-EK Data Sheet

Product codes
AT91SAM9N12-EK
Page of 1104
776
SAM9N12/SAM9CN11/SAM9CN12 [DATASHEET]
11063K–ATARM–05-Nov-13
Figure 40-28. Transmitter Behavior when Operating with Hardware Handshaking 
40.7.4 ISO7816 
Mode
The USART features an ISO7816-compatible operating mode. This mode permits interfacing with smart cards and
Security Access Modules (SAM) communicating through an ISO7816 link. Both T = 0 and T = 1 protocols defined by the
ISO7816 specification are supported.
Setting the USART in ISO7816 mode is performed by writing the USART_MODE field in the Mode Register (US_MR) to
the value 0x4 for protocol T = 0 and to the value 0x5 for protocol T = 1.
40.7.4.1 ISO7816 Mode Overview
The ISO7816 is a half duplex communication on only one bidirectional line. The baud rate is determined by a division of
the clock provided to the remote device (see 
). 
The USART connects to a smart card as shown in 
. The TXD line becomes bidirectional and the Baud Rate
Generator feeds the ISO7816 clock on the SCK pin. As the TXD pin becomes bidirectional, its output remains driven by
the output of the transmitter but only when the transmitter is active while its input is directed to the input of the receiver.
The USART is considered as the master of the communication as it generates the clock. 
Figure 40-29. Connection of a Smart Card to the USART 
When operating in ISO7816, either in T = 0 or T = 1 modes, the character format is fixed. The configuration is 8 data bits,
even parity and 1 or 2 stop bits, regardless of the values programmed in the CHRL, MODE9, PAR and CHMODE fields.
MSBF can be used to transmit LSB or MSB first. Parity Bit (PAR) can be used to transmit in normal or inverse mode.
Refer to 
The USART cannot operate concurrently in both receiver and transmitter modes as the communication is unidirectional
at a time. It has to be configured according to the required mode by enabling or disabling either the receiver or the
transmitter as desired. Enabling both the receiver and the transmitter at the same time in ISO7816 mode may lead to
unpredictable results.
The ISO7816 specification defines an inverse transmission format. Data bits of the character must be transmitted on the
I/O line at their negative value.
40.7.4.2 Protocol T = 0
In T = 0 protocol, a character is made up of one start bit, eight data bits, one parity bit and one guard time, which lasts
two bit times. The transmitter shifts out the bits and does not drive the I/O line during the guard time. 
If no parity error is detected, the I/O line remains to 1 during the guard time and the transmitter can continue with the
transmission of the next character, as shown in 
If a parity error is detected by the receiver, it drives the I/O line to 0 during the guard time, as shown in 
error bit is also named NACK, for Non Acknowledge. In this case, the character lasts 1 bit time more, as the guard time
length is the same and is added to the error bit time which lasts 1 bit time. 
CTS
TXD
Smart
Card
SCK
CLK
TXD
I/O
USART