MCF8315C read transaction over
I2C involves the following sequence (see Figure 6-55).
- I2C
Start condition from the controller to initiate the
transaction.
- Start is followed
by the I2C target ID byte, made up of 7-bit
target ID along with the R/W bit set to 0b. ACK (in yellow
box) indicates that MCF8315C
has processed the received target ID which has matched with
it's I2C target ID and therefore will proceed
with this transaction. If target ID received does not match
with the I2C ID of MCF8315C, then the transaction is ignored and
no ACK is sent by MCF8315C.
- The target ID
byte is followed by the 24-bit control word sent one byte at
a time. Bit 23 in the control word is set to 1b as it is a
read transaction. ACK (in blue boxes) correspond to
acknowledgements sent by MCF8315C to the controller that the previous
byte (of control word) has been received and next byte can
be sent.
- The control word
is followed by a Repeated Start (RS, start without a
preceding stop) or normal Start (P followed by S) to
initiate the data (to be read back) transfer from MCF8315C to I2C
controller. RS or S is followed by the 7-bit target ID along
with R/W bit set to 1b to initiate the read transaction. MCF8315C sends an ACK (in
grey box after RS) to the controller to acknowledge the
receipt of read transaction request.
- Post
acknowledgement of read transaction request, MCF8315C sends the data
bytes on SDA one byte at a time. The number of data bytes
sent by MCF8315C depends on the
DLEN field in the control word.
- While sending data bytes, the LSB byte is sent
first. Refer the examples in Section 6.6.2.4 for more details.
- 16-bit/32-bit Read – The data from the address
mentioned in control word is sent back to the
controller.
- 64-bit Read – 64-bit is treated as two successive
32-bit reads. The address mentioned in control
word is taken as Addr_1. Addr_2 is internally
calculated by MCF8315C by incrementing Addr_1 by 0x2. A
total of 8 data bytes are sent by MCF8315C. The first 4
bytes (sent in LSB first) are read from Addr_1 and
the next 4 bytes are read from Addr_2.
- ACK in orange boxes correspond to
acknowledgements sent by the controller to MCF8315C that the
previous byte has been received and next byte can
be sent.
- If CRC is enabled
in the control word, then MCF8315C sends an additional CRC byte at the
end. Controller has to read the CRC byte and then send the
last ACK (in orange). CRC is calculated for the entire
packet (Target ID + W bit, Control Word, Target ID + R bit,
Data Bytes).
- I2C
Stop condition from the controller to terminate the
transaction.