Clock Supply In Sleep Mode; Clock Supply During Debugging; Baud Rate Generator; Data Format - Epson S1C31W74 Technical Manual

Cmos 32-bit single chip microcontroller
Table of Contents

Advertisement

13.3.2 Clock Supply in SLEEP Mode

When using the UART2 during SLEEP mode, the UART2 operating clock CLK_UART2_n must be configured so
that it will keep supplying by writing 0 to the CLGOSC.xxxxSLPC bit for the CLK_UART2_n clock source.

13.3.3 Clock Supply During Debugging

The CLK_UART2_n supply during debugging should be controlled using the UART2_nCLK.DBRUN bit.
The CLK_UART2_n supply to the UART2 Ch.n is suspended when the CPU enters debug state if the UART2_
nCLK.DBRUN bit = 0. After the CPU returns to normal mode, the CLK_UART2_n supply resumes. Although the
UART2 Ch.n stops operating when the CLK_UART2_n supply is suspended, the output pin and registers retain the
status before the debug state was entered. If the UART2_nCLK.DBRUN bit = 1, the CLK_UART2_n supply is not
suspended and the UART2 Ch.n will keep operating in a debug state.

13.3.4 Baud Rate Generator

The UART2 includes a baud rate generator to generate the transfer (sampling) clock. The transfer rate is determined
by the UART2_nMOD.BRDIV, UART2_nBR.BRT[7:0], and UART2_nBR.FMD[3:0] bit settings. Use the follow-
ing equations to calculate the setting values for obtaining the desired transfer rate.
CLK_UART2
bps = — — — — — — — — — — —
BRT + 1
— — — — — + FMD
BRDIV
Where
bps:
Transfer rate [bit/s]
CLK_UART2: UART2 operating clock frequency [Hz]
BRDIV:
Baud rate division ratio (1/16 or 1/4) * Selected by the UART2_nMOD.BRDIV bit
BRT:
UART2_nBR.BRT[7:0] setting value (0 to 255)
FMD:
UART2_nBR.FMD[3:0] setting value (0 to 15)
For the transfer rate range configurable in the UART2, refer to "UART Characteristics, Transfer baud rates U
and U
" in the "Electrical Characteristics" chapter.
BRT2

13.4 Data Format

The UART2 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 UART2_nMOD.CHLN bit, the data length can be set to seven bits (UART2_nMOD.CHLN bit = 0) or
eight bits (UART2_nMOD.CHLN bit = 1).
Stop bit length
With the UART2_nMOD.STPB bit, the stop bit length can be set to one bit (UART2_nMOD.STPB bit = 0) or
two bits (UART2_nMOD.STPB bit = 1).
Parity function
The parity function is configured using the UART2_nMOD.PREN and UART2_nMOD.PRMD bits.
UART2_nMOD.PREN bit UART2_nMOD.PRMD bit
S1C31W74 TECHNICAL MANUAL
(Rev. 1.1)
BRT = BRDIV ×
Table 13.4.1 Parity Function Setting
1
1
1
0
0
*
Seiko Epson Corporation
(
)
CLK_UART2
— — — — — — — — — - FMD
bps
Parity function
Odd parity
Even parity
Non parity
13 UART (UART2)
- 1
(Eq. 13.1)
BRT1
13-3

Advertisement

Table of Contents
loading

Table of Contents