BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
579 / 1149
Rev.1.02
19.3.4
Serial communication runs the set register mn (SCRmn).
The SCRmn register is the communication operation setting register of channel n, which sets the data
transmission and reception modes, data and clock phases, whether to mask the error signal, parity test bits,
start bits, stop bits, and data length.
It is forbidden to overwrite the SCRmn register during operation (SEmn=1).
The SCRmn register is set by means of a 16-bit memory operation instruction.
After generating a reset signal, the value of the SCRmn register changes to "0087H".
Figure 19-7
Format of serial communication operation set register mn (SCRmn) (1/3).
After reset: 0087H
R/W
Symbol 15
14
13
12
11
10
9 8 7 6 5 4 3 2 1 0
SCRmn
TXEmn
RXEmn
Setting of channel n
operating mode
0
0
Prohibited communication.
0
1
Receive only.
1
0
Send only.
1
1
Enable sending and receiving.
SCLKp
SDOp
SDIp input timing
sequence
SCLKp
SDOp
SDIp input timing
sequence
SCLKp
SDOp
SDIp input timing
sequence
SCLKp
SDOp
SDIp input timing
sequence
data and clock phase selection in SSPI mode
in UART mode and simple I2C mode, must set DAPmn bit and CKPmn bit both to 0.
Type
EOCmn
Mask control of error interrupt signals (INTSREx (x=0~3)).
0
Disables the generation of error interrupts INTSREx (generate INTSRx).
1
Enable intSREx to be interrupted by errors (INTSRx is not generated when an error occurs).
In SSPI mode and simple I2C mode or when sending at UART, the EOCmn position must be placed in the "0"
note 3 .
Note 1
Limited to
SCR00,
SCR02,
SCR10
registers.
2. Limited to
SCR00
registers and
SCR01
registers, the other fixed as
"1".
3. Limited to
SCR20,
SCR21,
SCR30,
SCR31, other fixed as
"01".
4. When the
EOCmn
bit is
"0"
and
SSPImn
is not used, it is possible to produce an error interrupt
INTSREn.
Note that bit3,
6,
and 11
must be
set
to "0"
(
SCR01, SCR03,
SCR11
must also be set
,
bit5
of the
SCR21
register
is set to
"0"),
and
bit2
is set to
"1"
。
Remark
m: unit number (m=0
~
2) n: channel number (n=0
~
3) p: SSPI number (p=00, 01, 10, 11, 20, 21, 30, 31)
q: UART number (q=0
~
3) r: IIC number (r=00, 01, 10, 11, 20, 21, 30, 31)
TXE
mn
RXE
mn
Dap
mn
CKP
mn
0
EOC
mn
Note
4
PTC
mn1
PTC
mn0
You
mn
0
SLCm
n1
note1
SLC
mn0
DLSm
n3
note3
DLSm
n2
note3
DLSm
n1
note2
DLS
mn0