Technical information

SCI to SPI Peripheral Communication in V850ES Microcontrollers
Figure 5. SPI Mode Control Register
01234567
CPOL CPHA
SPI Mode Control Register
CPHA = 0 First-edge of SCK Used as Data Capture Strobe
Falling-edge of SS_B Indicates Start of Transmission
CPHA = 1 First-edge of SCK Used as Data Drive Strobe
Slave-unit Uses First-edge of SCK as Start of Transmission
CPOL = 0 Idle-state of SCK = 0 Rising-edge of SCK = Active-edge
CPOL = 1 Idle-state of SCK = 1 Falling-edge of SCK = Active-edge
2.3 Comparison of NEC Electronics CSI and SPI Transfer Operations
The NEC Electronics CSI unit has a Clock Selection Register (CSICn), which specifies clocking method
using the CKPn and DAPn bits. The SPI unit has an SPI Control Register, which specifies clocking
method using the CPOL and CPHA bits. Table 2 shows a comparison of NEC Electronics CSI clocking
methods and those of the SPI.
Table 2. CSI and SPI Clocking Methods
NEC Electronics CSI Clocking Method SPI Clocking Method
CKPn DAPn Clocking Type Descriptions
CPOL CPHA Clocking Type Descriptions
Type 1 clocking method Idle state clock = 1
Idle state clock = 1 First edge SCK is data drive strobe
0
0
First edge SCK is data drive strobe
1
1
Type 2 clocking method Idle state clock = 1
Idle state clock = 1 First edge clock is data capture strobe
0
1
First edge clock is data capture strobe
1
0
Type 3 clocking method Idle state clock = 0
Idle state clock = 0 First edge clock is data drive strobe
1
0
First edge clock is data drive strobe
0
1
Type 4 clocking method Idle state clock = 0
Idle state clock = 0 First edge clock is data capture strobe
1
1
First edge clock is data capture strobe
0
0
In both NEC Electronics CSI and SPI communication, when the first edge SCK is used as the data capture
strobe, Chip Select (SS_B) is used as a "start of transmission" signal. In this case, the Chip Select pin
should be driven inactive and then active again between data transmissions, as shown in Figure 6.
When the first edge SCK is used as the data drive strobe, the first edge SCK is the start of transmission
signal. In this case, the Chip Select pin can remain in the active state between data transmissions.
7