![NXP Semiconductors MKL27Z128VFM4 Reference Manual Download Page 738](http://html1.mh-extra.com/html/nxp-semiconductors/mkl27z128vfm4/mkl27z128vfm4_reference-manual_1721847738.webp)
38.9 Application information
This section describes the UART application information.
38.9.1 ISO-7816 initialization sequence
This section outlines how to program the UART for ISO-7816 operation. Elements such
as procedures to power up or power down the smartcard, and when to take those actions,
are beyond the scope of this description. To set up the UART for ISO-7816 operation:
1. Select a baud rate. Write this value to the UART baud registers (BDH/L) to begin the
baud rate generator. Remember that the baud rate generator is disabled when the
baud rate is zero. Writing to the BDH has no effect without also writing to BDL.
According to the 7816 specification the initial (default) baud rating setting should be
Fi = 372 and Di = 1 and a maximum frequency of 5 MHz. In other words, the BDH,
BDL, and C4 registers should be programmed such that the transmission frequency
provided to the smartcard device must be 1/372th of the clock and must not exceed 5
MHz.
2. Write to C1 to configure word length, parity, and other configuration fields (LOOPS,
RSRC) and set C1[M] = 1, C1[PE] = 1, and C1[PT] = 0.
3. Write to set S2[RWUID] = 0
4. Write to set up interrupt enable fields desired (C3[ORIE], C3[NEIE], C3[PEIE], and
C3[FEIE])
5. Write to set C4[MAEN1] = 0 and C4[MAEN2] = 0.
6. Write to C5 register and configure DMA control register fields as desired for
application.
7. Write to set C7816[INIT] = 1,C7816[ TTYPE] = 0, and C7816[ISO_7816E] = 1.
Program C7816[ONACK] and C7816[ANACK] as desired.
8. Write to IE7816 to set interrupt enable parameters as desired.
9. Write to ET7816 and set as desired.
10. Write to set C2[ILIE] = 0, C2[RE] = 1, C2[TE] = 1, C2[RWU] = 0, and C2[SBK] =
0. Set up interrupt enables C2[TIE], C2[TCIE], and C2[RIE] as desired.
Application information
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
738
Freescale Semiconductor, Inc.