MS51
Nov. 28, 2019 Page 391 of 491 Rev 1.00
MS51 32K SERIES TECHNICAL REFERENCE MANUAL
Undefined
T7 T8
T9
Time
T7
T8
T9
Comment
T7
97
145
177
177
T8 T9
83 87
131 135
163 167
163 167
Unit
SC Clock
Deactivation Trigger to SC_RST Low
SMC_ RST Low to Stop SC _CLK
Stop SC_CLK to Stop SC_PWR
SC_DAT
SC_RST
SC_CLK
SC_PWR
Figure 6.10 SC Deactivation Sequence
UART Mode 6.10.2.2
When the UARTEN (SCnCR2[0]) bit is set, the ISO 7816-3 Interface controller can also be used as
basic UART function. The following is the program example for UART mode.
Programming example:
1. Set UARTEN (SCnCR2[0]) bit to enter UART mode.
2. Fill “0” to CONSEL (SCnCR1[4]) and AUTOCEN (SCnCR1[3]) field. (In UART mode, those
fields must be “0”)
3. Select the UART baud rate by setting ETURDIV[11:0] ({SCnETURD1[3:0]:SCnETURD0[7:0]})
fields. For example, if smartcard module clock is 12 MHz and target baud rate is 115200bps,
ETURDIV should fill with (12000000 / 115200 – 1).
4. Select the data format include data length (by setting WLS (SCCR2[5:4]), parity format ( by
setting OPE (SCCR2[7]) and PBOFF (SCCR2[6]) ) and stop bit length (by setting NSB
(SCnCR1[7])).
5. Write the SCnDR (SCnDR[7:0]) (TX) register or read the SCnDR (SCnDR[7:0]) (RX) register
can perform UART function.F
6.10.3 ISO 7816-3 Data Transfer
Basically, the ISO 7816-3 interface acts as a half-duplex asynchronous communication port and its
data format is composed of ten consecutive bits which is showman.
Start
Pause
Start
D1
Delay Between Consecutive Characters
D2 D3 D4 D5 D6 D7 D8 P
Figure 6.10-2 SC Data Character
6.10.4 Initial Character TS
According to 7816-3, the initial character TS has two possible patterns shown in Figure 6.10-3 Initial
Character TS. If the TS pattern is 1100_0000, it is inverse convention. When decoded by inverse
convention, the conveyed byte is equal to 0x3F. If the TS pattern is 1101_1100, it is direct convention.
When decoded by direct convention, the conveyed byte is equal to 0x3B.Software can set AUTOCEN
(SCnCR1[3]) and then the operating convention will be decided by hardware. Software can also set
the CONSEL (SCnCR1[4]) register (set to ‘0’ or ‘1’) to change the operating convention after SC