125
CHAPTER 5. PERIPHERAL HARDWARE FUNCTIONS
(iv) Error occurrence
Operation in the event of an error in communication is described below.
A slave indicates the occurrence of an error by failing to return ACK to the master. When an error
occurs, the status bit indicating the occurrence of an error is set and all command processing being
executed is canceled.
After sending or receiving a byte, the master checks for ACK from the slave. If ACK is not returned
by the slave within a certain time after the end of transmission or reception, an error is judged to have
occurred and the master outputs an ACK signal (as a dummy).
Fig. 5-61 Master and Slave Operations after an Error
Errors are generated in the following circumstances:
Errors generated on the slave side
If the command transfer format is wrong.
If an undefined command is received.
If the transferred data length is insufficient in a READ command.
If the data storage area is too small in a WRITE command.
If the data changes in a READ, STATUS or CHGMST command data transmission.
ACK is not returned if any of the above cases.
Errors generated on the master side
If the data changes in a WRITE command data transmission, a STOP command is sent to the slave.
Error Data
Checks for ACK from slave
ACK Wait Time
End of Transmission
Start of ACK Check
End of Reception
Judges error to have occurred,
stops processing
ACK
Judges error to have 
occurred, outputs ACK
Slave
Processing
Master
Processin
SB0
4