I'm working on a state transition diagram for slave mode I2C software. I've started with the read part. See diagrams below.
Here is the question: Say the I2C master is reading 3 bytes, but the slave thinks it's only supposed to return two, what happens after the master sends the ACK for the second byte? It seems the but is now is a deadlock. The master is waiting for data and the slave is waiting for a stop command. I must be missing something. I'm asking about the "n=0/???" branch in the diagram.
here is the associated diagram from the megaAVR0 datasheet: