BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
684 / 1149
Rev.1.02
(1) Register settings
Fig. 19-95
register setting content when UART is transmitted by UART (UART0~UART3) (1/2).
(a) serial mode register mn (SMRmn)
(b) serial communication operation configuration register mn (SCRmn)
(c) serial data regsiter mn (SDRmn) (low 8 bit:TXDq)
(d) serial output voltage register m (SOLm)
Only configure bit of target channel.
channel n operational clock (fMCK)
0: SPSm register configured pre-scaler output clock CKm0
1: SPSm register configured pre-scaler output clock CKm1
channel n interrupt source
0: Transmit completion interrupt
1: Buffer empty interrupt
data transmit sequence selection
0: perform MSB first input/output
1: perform LSB first input/output
stop bit configuration
01B: add 1 bit
10B: add 2 bits
parity check bit configuration
00B: no parity check
01B: add zero parity
10B: add even parity
11B: add odd parity
TXDq
0: positive phase (normal) transmit
1: inverted phase transmit
baud rate configuration
transmit data configuration
Note2
Note 1
Limited to
SCR00
registers, other fixed as
"1".
2. When communicating with
a 9-bit data length,
bit0
to
8
of the
SDRm0
register
is the setting area for sending data.
Only
UART0
can communicate with
a data length of 9 bits.
Note
:
This example is the setting method for SCI0. The data length of SCI1/SCI2 and the serial data register SDRmn are set
differently from this example.
For data length settings, refer to Chapter 19.3.4
17).
For the setting method of serial data register SDRmn, refer to "19.3.6Serial data register
Note 1.m: Unit number (m=0~2)n: Channel number (n=0,
2)q:
UART
number (q=0~3)mn=00,
02,
10,
2 0
2.
:
Fixed setting in
UART
send mode. : Cannot be set
(initial value is set).
×: This is a bit that cannot be used in this mode (and the initial value is set if it is not used in other modes).
0/1: Set "0"
or
"
1
"
according to the user's purpose.