
BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
693 / 1149
Rev.1.02
(1) Register settings
19-103 Example of register setting content when UART receives 103 UART (UART0~UART 3) (1/2).
(a) serial mode register mn (SMRmn)
channel n operational clock (fMCK)
0: SPSm register configured pre-scaler output clock CKm0
1: SPSm register configured pre-scaler output clock CKm1
channel r operational mode:
0: transmit completion interrupt
1: buffer empty interrupt
channel N operational mode:
0: transmit completion interrupt
0: normal receiving
1: inverted phase receiving
(b) serial mode register mr(SMRmr)
samd configuration as CKSmn bit
data transmit sequence selection
0: perform MSB first input/output
1: perform LSB first input/output
data length configuration
parity check bit configuration
00B: no parity check
01B: add zero parity
10B: add even parity
11B: add odd parity
(d) serial data regsiter mn (SDRmn) (low 8 bit:TXDq)
TXDq
(c) serial communication operation configuration register mn(SCRmn)
baud rate configuration
received data register
Note2
Note1
Note 1
Limited to
SCR01
registers, other fixed as
"1".
2. When communicating with
a 9-bit data length,
bit0~8
of the
SDRm1
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
For the setting method of serial data register SDRmn, refer to "19.3.6Serial data register
Note that when the UART receives, the SMRmr register for channel r paired with channel n must also be set.
Remarks 1. m: unit number (m=0~2)n: channel number (n=1,
3)
mn=01, 03, 11, 21
r: channel number (r=n
–1) q: UART number (q=0
~
3)
2.
:
Fixed setting in
UART
receive 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.