![Epson S1C17F13 Technical Manual Download Page 94](http://html.mh-extra.com/html/epson/s1c17f13/s1c17f13_technical-manual_107784094.webp)
10 UART (UART)
S1C17F13 TeChniCal Manual
Seiko epson Corporation
10-3
(Rev. 1.0)
Clock Supply in DEBUG Mode
10.3.3
The CLK_UART
n
supply during DEBUG mode should be controlled using the UA
n
CLK.DBRUN bit.
The CLK_UART
n
supply to the UART Ch.
n
is suspended when the CPU enters DEBUG mode if the UA
n
CLK.
DBRUN bit = 0. After the CPU returns to normal mode, the CLK_UART
n
supply resumes. Although the UART
Ch.
n
stops operating when the CLK_UART
n
supply is suspended, the output pin and registers retain the status be-
fore DEBUG mode was entered. If the UA
n
CLK.DBRUN bit = 1, the CLK_UART
n
supply is not suspended and
the UART Ch.
n
will keep operating in DEBUG mode.
Baud Rate Generator
10.3.4
The UART includes a baud rate generator to generate the transfer (sampling) clock. The transfer rate is determined
by the UA
n
BR.BRT[7:0] and UA
n
BR.FMD[3:0] bit settings. Use the following equations to calculate the setting
values for obtaining the desired transfer rate.
CLK_UART
CLK_UART
bps = ———————————
BRT =
(
—————— - FMD - 16
)
÷
16 (Eq. 10.1)
{(BRT + 1)
×
16 + FMD}
bps
Where
CLK_UART: UART operating clock frequency [Hz]
bps:
Transfer rate [bit/s]
BRT:
UA
n
BR.BRT[7:0] setting value (0 to 255)
FMD:
UA
n
BR.FMD[3:0] setting value (0 to 15)
For the transfer rate range configurable in the UART, refer to “UART Characteristics, Transfer baud rates U
BRT1
and U
BRT2
” in the “Electrical Characteristics” chapter.
Data Format
10.4
The UART allows setting of the data length, stop bit length, and parity function. The start bit length is fixed at one
bit.
Data length
With the UA
n
MOD.CHLN bit, the data length can be set to seven bits (UA
n
MOD.CHLN bit = 0) or eight bits
(UA
n
MOD.CHLN bit = 1).
Stop bit length
With the UA
n
MOD.STPB bit, the stop bit length can be set to one bit (UA
n
MOD.STPB bit = 0) or two bits
(UA
n
MOD.STPB bit = 1).
Parity function
The parity function is configured using the UA
n
MOD.PREN and UA
n
MOD.PRMD bits.
4.1 Parity Function Setting
Table 10.
UA
n
MOD.PREN bit
UA
n
MOD.PRMD bit
Parity function
1
1
Odd parity
1
0
Even parity
0
*
Non parity