12 SYNCHRONOUS SERIAL INTERFACE (SPIA)
12-12
Seiko Epson Corporation
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
Table 12.7.1 Data Bit Length Settings
SPInMOD.CHLN[3:0] bits
Data bit length
0xf
16 bits
0xe
15 bits
0xd
14 bits
0xc
13 bits
0xb
12 bits
0xa
11 bits
0x9
10 bits
0x8
9 bits
0x7
8 bits
0x6
7 bits
0x5
6 bits
0x4
5 bits
0x3
4 bits
0x2
3 bits
0x1
2 bits
0x0
Setting prohibited
Bits 7–6
Reserved
Bit 5
PUEN
This bit enables pull-up/down of the input pins.
1 (R/W): Enable pull-up/down
0 (R/W): Disable pull-up/down
For more information, refer to “Input Pin Pull-Up/Pull-Down Function.”
Bit 4
NOCLKDIV
This bit selects SPICLK
n
in master mode. This setting is ineffective in slave mode.
1 (R/W): SPICLK
n
frequency = CLK_SPIA
n
frequency ( = 16-bit timer operating clock frequency)
0 (R/W): SPICLK
n
frequency = 16-bit timer output frequency / 2
For more information, refer to “SPIA Operating Clock.”
Bit 3
LSBFST
This bit configures the data format (input/output permutation).
1 (R/W): LSB first
0 (R/W): MSB first
Bit 2
CPHA
Bit 1
CPOL
These bits set the SPI clock phase and polarity. For more information, refer to “SPI Clock (SPICLK
n
)
Phase and Polarity.”
Bit 0
MST
This bit sets the SPIA operating mode (master mode or slave mode).
1 (R/W): Master mode
0 (R/W): Slave mode
Note: The SPInMOD register settings can be altered only when the SPInCTL.MODEN bit = 0.
SPIA Ch.
n
Control Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
SPInCTL
15–8 –
0x00
–
R
–
7–2 –
0x00
–
R
1
SFTRST
0
H0
R/W
0
MODEN
0
H0
R/W
Bits 15–2 Reserved