8.5.4 TUSB1146 I2C Slave Behavior
The following procedure should be followed to write data to TUSB1146 I2C registers (refer to Figure 29):
- The master initiates a write operation by generating a start condition (S), followed by the TUSB1146 7-bit address and a zero-value “W/R” bit to indicate a write cycle.
- The TUSB1146 acknowledges the address cycle.
- The master presents the register offset within TUSB1146 to be written, consisting of one byte of data, MSB-first.
- The TUSB1146 acknowledges the sub-address cycle.
- The master presents the first byte of data to be written to the I2C register.
- The TUSB1146 acknowledges the byte transfer
- The master may continue presenting additional bytes of data to be written, with each byte transfer completing with an acknowledge from the TUSB1146.
- The master terminates the write operation by generating a stop condition (P).
The following procedure should be followed to read the TUSB1146 I2C registers without a repeated Start (refer Figure 30).
- The master initiates a read operation by generating a start condition (S), followed by the TUSB1146 7-bit address and a zero-value “W/R” bit to indicate a read cycle.
- The TUSB1146 acknowledges the 7-bit address cycle.
- Following the acknowledge the master continues sending clock.
- The TUSB1146 transmit the contents of the memory registers MSB-first starting at register 00h or last read register offset+1. If a write to the I2C register occurred prior to the read, then the TUSB1146 shall start at the register offset specified in the write.
- The TUSB1146 waits for either an acknowledge (ACK) or a not-acknowledge (NACK) from the master after each byte transfer; the I2C master acknowledges reception of each data byte transfer.
- If an ACK is received, the TUSB1146 transmits the next byte of data as long as master provides the clock. If a NAK is received, the TUSB1146 stops providing data and waits for a stop condition (P).
- The master terminates the write operation by generating a stop condition (P).
The following procedure should be followed to read the TUSB1146 I2C registers with a repeated Start (refer Figure 31).
- The master initiates a read operation by generating a start condition (S), followed by the TUSB1146 7-bit address and a zero-value “W/R” bit to indicate a write cycle.
- The TUSB1146 acknowledges the 7-bit address cycle.
- The master presents the register offset within TUSB1146 to be written, consisting of one byte of data, MSB-first.
- The TUSB1146 acknowledges the register offset cycle.
- The master presents a repeated start condition (Sr).
- The master initiates a read operation by generating a start condition (S), followed by the TUSB1146 7-bit address and a one-value “W/R” bit to indicate a read cycle.
- The TUSB1146 acknowledges the 7-bit address cycle.
- The TUSB1146 transmit the contents of the memory registers MSB-first starting at the register offset.
- The TUSB1146 shall wait for either an acknowledge (ACK) or a not-acknowledge (NACK) from the master after each byte transfer; the I2C master acknowledges reception of each data byte transfer.
- If an ACK is received, the TUSB1146 transmits the next byte of data as long as master provides the clock. If a NAK is received, the TUSB1146 stops providing data and waits for a stop condition (P).
- The master terminates the read operation by generating a stop condition (P).
The following procedure should be followed for setting a starting sub-address for I2C reads (refer to Figure 32).
- The master initiates a write operation by generating a start condition (S), followed by the TUSB1146 7-bit address and a zero-value “W/R” bit to indicate a write cycle.
- The TUSB1146 acknowledges the address cycle.
- The master presents the register offset within TUSB1146 to be written, consisting of one byte of data, MSB-first.
- The TUSB1146 acknowledges the register offset cycle.
- The master terminates the write operation by generating a stop condition (P).
NOTE
After initial power-up, if no register offset is included for the read procedure (refer to Figure 30), then reads start at register offset 00h and continue byte by byte through the registers until the I2C master terminates the read operation. During a read operation, the TUSB1146 auto-increments the I2C internal register address of the last byte transferred independent of whether or not an ACK was received from the I2C master.