R01UH0823EJ0100 Rev.1.00
Page 1404 of 1823
Jul 31, 2019
RX23W Group
38. Serial Peripheral Interface (RSPIa)
(4) Initialization Flowchart
is a flowchart illustrating an example of initialization in clock synchronous operation when the RSPI is
used in master mode. For a description of how to set up the interrupt controller, DMAC, and I/O ports, refer to the
descriptions given in the individual blocks.
Figure 38.46
Example of Initialization Flowchart in Master Mode (Clock Synchronous Operation)
Set RSPI pin control register
(SPPCR)
Set RSPI bit rate register (SPBR)
Set RSPI data control register
(SPDCR)
Set RSPI clock delay register
(SPCKD)
Set RSPI slave select negation
delay register (SSLND)
Set RSPI next-access delay register
(SPND)
Set RSPI command registers 0 to 7
(SPCMD0 to SPCMD7)
Set I/O ports
Set RSPI control register (SPCR)
Set interrupt controller
Set DMAC
• Sets MOSI signal value when transfer is in idle state.
• Sets SSL negation delay value.
• Sets next-access delay value.
(when using an interrupt)
(when using the DMAC)
• Sets transfer bit rate.
• Sets number of frames to be used.
• Sets RSPCK delay value.
• Sets the value of SSL negation delay.
• Sets RSPCK delay enable.
• Sets SSL negation delay enable.
• Sets next-access delay enable.
• Sets MSB or LSB first.
• Sets data length.
• Sets transfer bit rate.
• Sets clock polarity.
• Sets master mode.
• Sets interrupt mask.
• Sets RSPI mode.
Set RSPI control register 2 (SPCR2)
• Sets parity function.
• Sets interrupt mask.
Read RSPI control register (SPCR)
RSPI sequence control register
(SPSCR)
• Sets sequence length.
Start of initialization in
master mode
End of initialization in
master mode