
NUC126
Aug. 08, 2018
Page
558
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
Start
Start
D1 D2 D3
D4 D5 D6
D7 D8
P
EGT
Stop bit
Figure 6.15-12 Extra Guard Time Operation
6.15.5.7 UART Mode
When the UARTEN (SC_UARTCTL[0]) bit is set, the Smart Card Interface controller can also be used
as basic UART function. The following is the program example for UART mode.
Programming example
1. Set UARTEN (SC_UARTCTL[0]) bit to enter UART mode.
2. Do user reset by setting RXRST (SC_ALTCTL[1]) and TXRST(SC_ALTCTL[0]) bit to ensure
that all state machine return idle state.
3. In UART mode, CONSEL (SC_CTL[5:4]) and AUTOCEN (SC_CTL[3]) fields must be set to 0.
4. Select the UART baud rate by setting ETURDIV (SC_ETUCTL[11:0]) fields. For example, if
smartcard module clock is 12 MHz and target baud rate is 115200 bps, ETURDIV should fill
with ((12000000 / 115200) - 1).
5. Select the data format include data length by setting WLS (SC_UARTCTL[5:4]), parity format
by setting OPE (SC_UARTCTL[7]) and PBOFF (SC_UARTCTL[6]), and stop bit length by
setting NSB (SC_CTL[15]).
6. Select the receiver buffer number trigger level by setting RXTRGLV (SC_CTL[7:6]) field and
the receiver buffer time-out interval by setting RFTM (SC_RXTOUT[8:0]) field.
7. Write the SC_DAT (SC_DAT[7:0]) (Tx send) or read the SC_DAT (SC_DAT[7:0]) (Rx receive)
can perform UART function.