BAT32G1x9 user manual | Chapter 19 Universal serial communication unit
609 / 1149
Rev.1.02
(1) Register settings
Fig19-30: 3 wire serial I/O (SSPI00, SSPI01, SSPI10, SSPI11, SSPI20, SSPI21, SSPI30, SSPI31)
Example of register setting content when the master receives
(a) serial mode register mn(SMRmn)
(b) serial communication operation configuration registermn mn(SCRmn)
(c)
serial data register
mn(SDRmn) (low 8 bit: SIOp)
(d) serial output registerm (SOm)
Only configure bit of target channel
(e) serial output register m(SOEm)
...Not used in this mode
(f) serial channel start register m (SSm)
Only set bit of target channel to 1.
channel n operational clock
(
f
MCK
)
0: SPSm register configured pre-scaler output clock CKm0
1: SPSm register configured pre-scaler output clock CKm1
interrupt source of channel n
0: Transmit completion interrupt
1: Buffer empty interrupt
data transmit sequence selection
0: perform MSB first input/output
1: perform LSB first input/output
data length configuration
0: 7 bit data length
1: 8 bit data length
data and clock phase selection (details refer to
"19.3 control universal serial communication
unit registers)
when clock phase is "positive phase" (CKPmn of SCRmn register as 0), "1" means
starting communication; when clock phase is "inverted phase" (CKPmn=1), "0"
means starting communication.
SIOp
baud rate configuration
(operation clock (fmck) scaling configuration )
received data
write virtual data
FFH
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
Remark1.m: unit number (m=0
~
2) n: channel number (n=0
~
3) p: SSPI number (p=00, 01, 10, 11, 20, 21,
30, 31)
mn=00
~
03, 10
~
11, 20
~
21
2.
:
Fixed setting in
SSPI
master 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.