R01UH0823EJ0100 Rev.1.00
Page 1388 of 1823
Jul 31, 2019
RX23W Group
38. Serial Peripheral Interface (RSPIa)
(3) Sequence Control
The transfer format that is employed in master mode is determined by SPSCR, SPCMDm, SPBR, SPCKD, SSLND, and
SPND registers.
SPSCR is a register used to determine the sequence configuration for serial transfers that are executed by the RSPI in
master mode. The following items are set in SPCMDm register: SSLAi pin output signal value, MSB/LSB first, data
length, some of the bit rate settings, RSPCK polarity/phase, whether SPCKD is to be referenced, whether SSLND is to be
referenced, and whether SPND is to be referenced. SPBR holds some of the bit rate settings; SPCKD, an RSPI clock
delay value; SSLND, an SSL negation delay; and SPND, a next-access delay value.
According to the sequence length that is assigned to SPSCR, the RSPI makes up a sequence comprised of a part or all of
SPCMDm register. The RSPI contains a pointer to the SPCMDm register that makes up the sequence. The value of this
pointer can be checked by reading the SPSSR.SPCP[2:0] bits. When the SPCR.SPE bit is set to 1 and the RSPI function
is enabled, the RSPI loads the pointer to the commands in SPCMD0, and incorporates the SPCMD0 settings into the
transfer format at the beginning of serial transfer. The RSPI increments the pointer each time the next-access delay
period for a data transfer ends. Upon completion of the serial transfer that corresponds to the final command comprising
the sequence, the RSPI sets the pointer in SPCMD0, and in this manner the sequence is executed repeatedly.
Figure 38.31
Procedure for Determining the Form of Serial Transfer in Master Mode
In this section, a frame is the combination of the data (SPDR) and the settings (SPCMDm).
Figure 38.32
Concept of a Frame
SPSCR
Command
pointer control
SPCMD0
SPCMD1
SPCMD2
SPCMD3
SPCMD4
SPCMD5
SPCMD6
SPCMD7
SPCKD
SSLND
SPND
Transfer format determiner
SCKDEN
SLNDEN
SPNDEN
CPHA
CPOL
BRDV[1:0]
SSLA[2:0]
SSLKP
SPB[3:0]
LSBF
Sequence length setting
Determining reference command
Loading transfer format settings
Frame
+
Settings
Data
Data
(SPDR)
Settings
(SPCMD)