26.3.2.3.2 Receiving Data Packets

Assuming the above S1 case, the client must be ready to receive data. When a data packet is received, the Data Interrupt Flag (DIF) in the Client Status (TWIn.SSTATUS) register is set to ‘1’. The action selected by the Acknowledge Action (ACKACT) bit in the Client Control B (TWIn.SCTRLB) register is automatically sent on the bus when a command is written to the Command (SCMD) bit field in the TWIn.SCTRLB register.

The software can prepare to take one of the following actions:
  • Respond with an ACK by writing ‘0’ to the ACKACT bit in the TWIn.SCTRLB register, indicating that the client is ready to receive more data
  • Respond with a NACK by writing ‘1’ to the ACKACT bit, indicating that the client cannot receive any more data and the host must issue a Stop or repeated Start condition