MS51
Nov. 28, 2019
Page
392
of 491
Rev 1.00
MS51
32K
SE
RIES
TE
CHNICAL RE
F
EREN
CE MA
N
UAL
received TS of answer to request (ATR).
If auto convention function is enabled by setting AUTOCEN (SCnCR1[3]) register, the setting step
must be done before Answer to Request state and the first data must be 0x3B or 0x3F. After hardware
received first data and stored it at buffer, the hardware will decided the convention and change the
CONSEL (SCnCR1[4]) register automatically. If the first data is neither 0x3B nor 0x3F, the hardware
will generate an interrupt (if ACERRIEN (ScnIE[4] = ‘1’) to CPU.
Start
Start
D1
P
Character T0
Inverse Convention
Start
Start
P
Character T0
Direct Convention
Inverse Convention
Direct Convention
t = 12 ~ 9600 ETU
t = 12 ~ 9600 ETU
D2
D3
D4
D5
D6
D7
D8
D1
D2
D3
D4
D5
D6
D7
D8
0_ 1101_ 1100_ 1 (0x3B)
0_ 1100_ 0000_ 1 (0x3F)
Figure 6.10-3 Initial Character TS
6.10.5 Error Signal and Character Repetition
According to ISO 7816-3 T=0 mode description, as shown in Figure 6.10-4,if the receiver receives a
wrong parity bit, it will pull the SC_DAT to low by 1.5 bit period to inform the transmitter parity error.
Then the transmitter will retransmit the character. The SC interface controller supports hardware error
detection function(SC0TSR[4]) in receiver, SC controller will generate a transfer error interrupt(if
TERRIEN(ScnIE[2] = ‘1’) to CPU.
When in T=1 mode, the receiver will not pull the SC_DAT to low by 1.5 bit period to inform the
transmitter parity error.
Start
P
Stop
Start
Start
P
Repetition
0
1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
5
6
7
8
9
10
11
12
Start
P
Start
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
No Parity Error
With Parity Error (Receiver)
With Parity Error (Transmitter)
Re-transmit
Byte (i)
Byte (i)
Byte (i)
Byte (i)
Byte (i+1)
Detect Error Signal
Pull Low and Detect Next Start Bit
4 clocks
Byte (i)
1.5 clocks
Figure 6.10-4 SC Error Signal
6.10.6 Block Guard Time and Extra Guard Time
Block guard time means the minimum bit length between the leading edges of two consecutive
characters between different transfer directions. This field indicates the counter for the bit length of
block guard time.
According to ISO 7816-3, in T = 0 mode, software must fill T bit = 0 (real block guard time = 16.5) to
this field; in T = 1 mode, software must fill T bit = 1 (real block guard time = 22.5) to it.