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

Slave

 

 

 

End of Reception

 

 

 

 

 

 

Judges error to have occurred,

Processing

 

 

 

 

 

 

stops processing

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SB0

Error Data

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Wait Time

Master

 

 

 

 

ACK

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Checks for ACK from slave

Processin

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

End of Transmission

 

 

 

 

 

 

 

 

Start of ACK Check

ACK

Judges error to have occurred, outputs ACK

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.

4If 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.

125

Page 136
Image 136
NEC PD75P402, PD75402A Iv Error occurrence, Errors generated on the slave side, Errors generated on the master side, 125