![NXP Semiconductors MKL27Z128VFM4 Reference Manual Download Page 732](http://html1.mh-extra.com/html/nxp-semiconductors/mkl27z128vfm4/mkl27z128vfm4_reference-manual_1721847732.webp)
BIT 0 BIT 1 BIT 2
BIT 3 BIT 4 BIT 5 BIT 6 BIT 7
BIT
STOP
BIT
PARITY
NEXT
START
BIT
START
BIT
ISO 7816 FORMAT WITHOUT PARITY ERROR (T=0)
STOP
BIT
BIT 0 BIT 1 BIT 2
BIT 3 BIT 4 BIT 5 BIT 6 BIT 7
BIT
STOP
BIT
PARITY
NEXT
START
BIT
START
BIT
NACK
ERROR
ISO 7816 FORMAT WITH PARITY ERROR (T=0)
Figure 38-24. ISO-7816 T = 0 data format
As with other protocols supported by the UART, the data character includes a start bit.
However, in this case, there are two stop bits rather than the typical single stop bit. In
addition to a standard even parity check, the receiver has the ability to generate and return
a NACK during the second half of the first stop bit period. The NACK must be at least
one time period (ETU) in length and no more than two time periods (ETU) in length. The
transmitter must wait for at least two time units (ETU) after detection of the error signal
before attempting to retransmit the character.
It is assumed that the UART and the device (smartcard) know in advance which device is
receiving and which is transmitting. No special mechanism is supplied by the UART to
control receive and transmit in the mode other than C2[TE] and C2[RE]. Initial Character
Detect feature is also supported in this mode.
38.5.7.3 Protocol T = 1
When T = 1 protocol is selected, the NACK error detection scheme is not used. Rather,
the parity bit is used on a character basis and a CRC or LRC is used on the block basis,
that is, for each group of characters. In this mode, the data format allows for a single stop
bit although additional inactive bit periods may be present between the stop bit and the
next start bit. Data characters are formatted as illustrated in the following figure.
BIT 0 BIT 1 BIT 2
BIT 3 BIT 4 BIT 5 BIT 6 BIT 7
BIT
STOP
BIT
PARITY
NEXT
START
BIT
START
BIT
ISO 7816 FORMAT (T=1)
Figure 38-25. ISO 7816 T=1 data format
The smallest data unit that is transferred is a block. A block is made up of several data
characters and may vary in size depending on the block type. The UART does not
provide a mechanism to decode the block type. As part of the block, an LRC or CRC is
included. The UART does not calculate the CRC or LRC for transmitted blocks, nor does
it verify the validity of the CRC or LRC for received blocks. The 7816 protocol requires
that the initiator and the smartcard (device) takes alternate turns in transmitting and
receiving blocks. When the UART detects that the last character in a block has been
transmitted it will automatically clear C2[TE], C3[TXDIR] and enter receive mode.
Functional description
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
732
Freescale Semiconductor, Inc.