English
Language : 

K60P100M100SF2RM Datasheet, PDF (1558/1809 Pages) Freescale Semiconductor, Inc – K60 Sub-Family Reference Manual
Application information
operate as a depth of one. This is the default/reset behavior of the module and can be
adjusted using the PFIFO[RXFE] and PFIFO[TXFE] bits. Individual watermark levels
are also provided for transmit and receive.
There are multiple ways to ensure that a data block (set of characters) has completed
transmission. These methods include:
1. Set TXFIFO[TXWATER] to 0. The TDRE flag will assert when there is no further
data in the transmit buffer. Alternatively the S1[TC] flag can be used to indicate
when the transmit shift register is also empty.
2. Poll the TCFIFO[TXCOUNT] field. Assuming that only data for a data block has
been put into the data buffer, when TCFIFO[TXCOUNT] = 0 all data has been
transmitted or is in the process of transmission.
3. The S1[TC] flag can be monitored. When S1[TC] asserts it indicates that all data has
been transmitted and there is no data currently being transmitted in the shift register.
51.8.2 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 setup 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
should be 1/372th of the clock provided to the smartcard device and should not
exceed 5 MHz.
2. Write to set BDH[LBKDIE] = 0.
3. Write to C1 to configure word length, parity, and other configuration bits (LOOPS,
RSRC) and set C1[M] = 1, C1[PE] = 1, C1[PT] = 0.
4. Write to set S2[RWUID] = 0, S2[LBKDE] = 0.
5. Write to set MODEM[RXRTSE] = 0, MODEM[TXRTSPOL] = 0,
MODEM[TXRTSE] = 0, and MODEM[TXCTSE] = 0.
1558
K60 Sub-Family Reference Manual, Rev. 6, Nov 2011
Freescale Semiconductor, Inc.