
16.1.4.4 Clock Phase Setting Function
With the CKPH bit in the UiSMR3 register (i = 0 to 4) and the CKPOL bit in the UiC0 register, one of four
combinations of serial clock polarity and phases can be selected.
The master must have the same serial clock polarity and phases as the slaves involved in the communication.
16.1.4.5 When Setting the DINC Bit to 0 (Master (Internal Clock))
Figure 16.25 shows transmit and receive timing in master mode.
16.1.4.6 When Setting the DINC Bit to 1 (Slave (External Clock))
When the CKPH bit is set to 0 (no clock delay) and a high-level (“H”) signal is applied to the SSi pin, the
STXDi pin is placed in a high-impedance state. When a low-level (“L”) signal is applied to the SSi pin,
conditions to start serial communication are met, but the output value of the STXDi pin is undefined until serial
communication starts in synchronization with the serial clock.
Figure 16.26 shows transmit and receive timing
in slave mode (external clock, CKPH = 0).
When the CKPH bit is set to 1 (clock delay) and an “H” signal is applied to the SSi pin, the STXDi pin is placed
in a high-impedance state. When an “L” signal is applied to the SSi pin, the STXDi pin is placed in an output
state and serial communication starts in synchronization with the serial clock.
Figure 16.27 shows transmit and receive timing in slave mode (external clock, CKPH = 1).
Figure 16.25
Transmit and Receive Timing in Master Mode (Internal Clock)
Signal applied to
SS pin in master MCU
Clock output
(CKPOL = 0, CKPH = 0)
D3
D4
D5
D6
D2
Data input timing
Data output timing
Clock output
(CKPOL = 1, CKPH = 1)
Clock output
(CKPOL = 0, CKPH = 1)
Clock output
(CKPOL = 1, CKPH = 0)
"H"
"L"
D0
D1
D7
CKPOL: Bit in the UiC0 register (i = 0 to 4)
CKPH: Bit in the UiSMR3 register
"H"
"L"
"H"
"L"
"H"
"L"
"H"
"L"
"H"
"L"