30. Serial Peripheral Interface (RSPI)
30.3.8
Error Detection
In the normal RSPI serial transfer, the data written to the transmit buffer of SPDR is serially transmitted, and the serially
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.
Table 30.9 lists the relationship between non-normal transfer operations and the RSPI’s error detection function.
On operation A described in
Table 30.9, the RSPI does not detect an error. To prevent data omission during the writing
to SPDR, write operations to SPDR should be executed using a transmit interrupt request.
Likewise, the RSPI does not detect an error on operation B. 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 B 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).
Similarly, the RSPI does not detect an error on operation C. To prevent extraneous data from being read, SPDR read
operation should be executed using a receive interrupt request.
Table 30.9
Relationship between Non-Normal Transfer Operations and RSPI Error Detection Function
Occurrence Condition
RSPI Operation
Error Detection
A
SPDR is written when the transmit buffer is full.
The contents of the transmit buffer are kept.
Missing write data.
None
B
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
serially transmitted.
None
C
SPDR is read when the receive buffer is empty.
Previously received serial data is output.
None
D
Serial transfer terminates when the receive buffer is full.
The contents of the receive buffer are kept.
Missing serial receive data.
Overrun error
E
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
F
The SSLA0 input signal is asserted when the serial
transfer is idle in multi-master mode.
Driving of the RSPCKA, MOSIA, SSLA1 to
SSLA3 output signals is stopped.
RSPI function is disabled.
Mode fault error
G
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 to
SSLA3 output signals is stopped.
RSPI function is disabled.
Mode fault error
H
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