R01UH0823EJ0100 Rev.1.00
Page 1381 of 1823
Jul 31, 2019
RX23W Group
38. Serial Peripheral Interface (RSPIa)
38.3.8
Error Detection
In the normal RSPI serial transfer, the data written to the transmit buffer of SPDR is transmitted, and the received data
can be read from the receive buffer of SPDR. If access is made to SPDR, depending on the status of the transmit/receive
buffer or the status of the RSPI at the beginning or end of serial transfer, in some cases non-normal transfers can be
executed.
If a non-normal transfer operation occurs, the RSPI detects the event as an overrun error, parity error, or mode fault error.
lists the relationship between non-normal transfer operations and the RSPI’s error detection function.
, the RSPI does not detect an error. To prevent data omission during the writing to
SPDR, the SPDR register should be written when a transmit buffer empty interrupt request occurs or while the
SPSR.SPTEF flag is 1.
Likewise, the RSPI does not detect an error on operation 2. To prevent extraneous data from being read, the SPDR
register should be read when an RSPI receive buffer full interrupt request occurs or while the SPSR.SPRF flag is 1.
Similarly, the RSPI does not detect an error on operation 3. In a serial transfer that was started before the shift register
was updated, the RSPI sends the data that was received in the previous serial transfer, and does not treat the operation
indicated in 3 as an error. Note that the received data from the previous serial transfer is retained in the receive buffer of
SPDR, thus it can be correctly read (if SPDR is not read before the end of the serial transfer, an overrun error may occur).
An overrun error shown in 4 is described in
section 38.3.8.1, Overrun Error
. A parity error shown in 5 is described in
section 38.3.8.2, Parity Error
. A mode fault error shown in 6 to 8 is described in
section 38.3.8.3, Mode Fault Error
For the transmit and receive interrupts, refer to
section 38.3.7, Transmit Buffer Empty/Receive Buffer Full
Table 38.8
Relationship between Non-Normal Transfer Operations and RSPI Error Detection Function
Occurrence Condition
RSPI Operation
Error Detection
1
SPDR is written when the transmit buffer is full.
The contents of the transmit buffer are kept.
Missing write data.
None
2
SPDR is read when the receive buffer is empty.
Data received previously is output to the bus.
None
3
Serial transfer is started in slave mode when transmit
data is still not loaded on the shift register.
Data received in previous serial transfer is
transmitted.
None
4
Serial transfer terminates when the receive buffer is full.
The contents of the receive buffer are kept.
Missing receive data.
Overrun error
5
An incorrect parity bit is received when performing full-
duplex synchronous serial communications with the
parity function enabled.
The parity error flag is asserted.
Parity error
6
The SSLA0 input signal is asserted when the serial
transfer is idle in multi-master mode.
Driving of the RSPCKA, MOSIA, SSLA1,
SSLA3 output signals is stopped.
RSPI function is disabled.
Mode fault error
7
The SSLA0 input signal is asserted during serial transfer
in multi-master mode.
Serial transfer is suspended.
Missing transmit/receive data.
Driving of the RSPCKA, MOSIA, SSLA1,
SSLA3 output signals is stopped.
RSPI function is disabled.
Mode fault error
8
The SSLA0 input signal is negated during serial transfer
in slave mode.
Serial transfer is suspended.
Missing transmit/receive data.
Driving of the MISOA output signal is
stopped.
RSPI function is disabled.
Mode fault error