Alternatively, if the master cannot support an SMBus Block-Write Block-Read process call, it can be emulated by two transactions (a block write followed by a block read). This should only be done in a single master system, since in a dual master system collisions can occur that corrupt the data and transaction. Below is the sequence of events for these transactions:
- The master issues a START to start this transaction.
- The master sends the 7-bit slave address followed by a write bit (low).
- The slave asserts the ACK.
- The master sends the Block Read command code (F1h) and the slave asserts the ACK.
- The master sends the Byte Count (2h) for this transaction and the slave asserts the ACK.
- The master sends the Start Register Address and the slave asserts the ACK.
- The master sends the Byte Count (1-20h) for the Block-Read Process Call and the slave asserts the ACK.
- The master sends a STOP to end this transaction.
- The master sends a START to start this transaction.
- The master sends the 7-bit slave address followed by a write bit (low) and the slave asserts the ACK.
- The master sends the Block Read Command code (F1h) and the slave asserts the ACK.
- The master sends a repeat START.
- The master sends the 7-bit slave address followed by a read bit (high) and the slave asserts the ACK.
- The master receives Byte Count (this matches the size sent by the master in step 7) and asserts the ACK.
- The master receives Data Byte 1 and asserts the ACK.
- The master receives Data Byte 2 and asserts the ACK.
- The master receives N-3 data bytes, and asserts ACK for each one.
- The master receives the last data byte and asserts a NACK.
- The master issues a STOP to end this transaction.
1 | 2 | | 3 | 4 | | 5 | | 6 | | 7 | | 8 | 9 | 10 | | | ∼ |
S | Slave Address | W | A | Block Read Command Code (F1h) | A | Byte Count (2h) | A | Start Register Address | A | Byte Count (1–20h) (N) | A | P | S | Slave Address | W | A |
∼ | 11 | | 12 | 13 | | | | 14 | | 15 | | 16 | | | 17 | | 16 |
Block Read Command Code (F1h) | A | S | Slave Address | R | A | | Byte Count (1–20h) (N) | A | Data Byte 1 | A | Data Byte 2 | A | ∼ | Data Byte N | /A | P |
Special Notes:
- Steps 9 through 19 can be repeated to read another block of data. The address auto-increments such that the next block starts where the last block left off. The size returned by the LM94 is the same each time.
- The LM94 returns 00h when address locations outside of normal address space are read.
- Block reads do not wrap around from address FFh to 00h
- If the master acknowledges more bytes that it requested, the LM94 continues to supply data until the master does not acknowledge a byte.
- If the master does not acknowledges a byte to prematurely abort a block read, the LM94 gets off the bus to allow the master to issue a STOP signal.
- After a block read is finished, the base address of the LM94 is updated to point to the byte just beyond the last byte read.