29.3.2.3.3 Transmitting Data Packets
Assuming the S2 case above, the client can
start transmitting data by writing to the Client Data (TWIn.SDATA) register. When a data
packet transmission is completed, the Data Interrupt Flag (DIF) in the Client Status
(TWIn.SSTATUS) register is set to ‘1
’.
The software can prepare to take one of the following actions:
- Check if the host responded with an ACK by reading the Received Acknowledge (RXACK) bit from the Client Status (TWIn.SSTATUS) register, and start transmitting new data packets
- Check if the host responded with a NACK by reading the RXACK bit and stop transmitting data packets. The host must send a Stop or repeated Start condition after the NACK.