![Cmsemicon BAT32G1 9 Series Скачать руководство пользователя страница 577](http://html1.mh-extra.com/html/cmsemicon/bat32g1-9-series/bat32g1-9-series_user-manual_2627609577.webp)
BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
577 / 1149
Rev.1.02
19.3.3
Serial mode register mn (SMRmn).
The SMRmn register is a register that sets the operating mode of channel n, selects the operating clock
(f
MCK
), specifies whether the serial clock (f
SCLK
) input can be used, sets the start of triggering, and operates the
mode Settings (SSPI, UART, Simple
I2C
) and selection of interrupt sources. In addition, the inverting level of
the received data is set only in UART mode.
It is forbidden to overwrite the SMRmn register during operation (SEmn=1), but it is possible to override the
MDmn0 bit during operation.
The SMRmn register is set by means of a 16-bit memory operation instruction.
After generating a reset signal, the value of the SMRmn register changes to "0020H".
Figure 19-6
serial mode register mn (SMRmn) (1/2).
After reset: 0020H
R/W
Symbol 15
14
13
12
11
10
9 8 7 6 5 4 3 2 1 0
SMRmn
CKSmn
Channel n
running clock (f
MCK
) selection
0
The SPSm register sets the operating clock
CKm0
1
The SPSm register sets the operating clock
CKm1
The operating clock (f
MCK
) is used for edge detection circuitry. By setting the CCSmn bit and the SDRmn register 7
bits high, a transmit clock (f
TCLK
) is generated.
CCSmn
Channel n
transmission clock (f
TCLK
) selection
0
The CKSmn bit specifies the running clock
f
MCK's
divider clock
1
Input clock
f
SCLK
from the
SCLKp
pin (slave transfer in SSPI mode).
The transmit clock f
TCLK
is used for shift registers, communication control circuits, output controllers, interrupt
control circuits, and error control circuits. When the
CCSmn
bit is
At "0", the
operating clock (f MCK) is set by dividing the operating clock (f
MCK
) by the high
7
bits of the
SDRmn
register.
STSmn
Note
1
Start the selection of trigger sources
0
Only software triggers are valid (selected in SSPI,
UART
send, easy
I2C
).
1
The effective edge of the RxDq pin
(
selected when received by
the UART
).
When the above conditions are met after setting the SSm
register to
"1", the transfer starts.
Note 1
Limited to
SMR01,
SMR03,
AND SMR11
registers only.
Note that bit13~9, 7,
4
,
3
(SMR00, SMR02,
MUST BE APPLIED TO
BIT13,7,4,3
.)
The SMR10
register is
bit13~6,
4,
3)
set
"0"
and will bit5
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)
CKS
mn
CCS
mn
0
0
0
0
0
STSm
n
note1
0
SISmn
0
note1
1
0
0
MD
mn2
MD
mn1
MD
mn0