Users Manual

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 1380 of 1852
Nov 30, 2020
RX23W Group 38. Serial Peripheral Interface (RSPIa)
(2) MSB First Transfer (24-Bit Data)
Figure 38.19 shows details of operations by the RSPI data register (SPDR) and the shift register in transfer with parity
enabled, 24 bits as the RSPI data length for an example that is not 32 bits, and MSB first selected.
In transmission, the value of the parity bit (P) is calculated from bits T23 to T01. This replaces the final bit, T00, and the
whole is copied to the shift register. Data are transmitted in the order T23, T22, …, T01, and P.
In reception, received data are shifted in bit by bit through bit 0 of the shift register. When bits R23 to P have been
collected after input of the required number of cycles of RSPCK, the value in the shift register is copied to the receive
buffer. On copying of data to the shift register, the data from R23 to P are checked by judging the parity. At this time, the
higher-order 8 bits of the transmit buffer are stored in the higher-order 8 bits of the receive buffer. Writing 0 to bits T31
to T24 at the time of transmission leads to 0 being inserted in the higher-order 8 bits of the receive buffer.
Figure 38.19 MSB First Transfer (24-Bit Data, Parity Enabled)
Output
Transfer start
Transfer end
T31 T30 T29 T28 T27 T26 T25 T24 T23 T06 T05 T04 T03 T02 T01 T00
T31 T30 T29 T28 T27 T26 T25 T24 T23
T31T30T29T28T27T26T25T24R23
T31T30T29T28T27T26T25T24R23
T06 T05 T04 T03 T02 T01 P
R06 R05 R04 R03 R02 R01
P
R06 R05
T08 T07
T08 T07
R08 R07
R08 R07 R04 R03 R02 R01 P
Shift register
Copy
Shift register
Input
Copy
Bit 0
Receive buffer
Bit 31
Bit 24 Bit 23
Bit 0Bit 31
Bit 24 Bit 23
Bit 0Bit 31
Bit 23
Transmit buffer
Bit 0Bit 31
Bit 23
T31 T30 T29 T28 T27 T26 T25 T24 T23 T06 T05 T04 T03 T02 T01 P
T08 T07
Parity added
Note: Output = MOSI (master)/MISO (slave), input = MISO (master)/MOSI (slave)