MCF8316A
write operation over I2C involves the following sequence.
- I2C start
condition.
- The sequence starts with
I2C target start byte, made up of 7-bit target ID (0x01) to identify the MCF8316A along with the R/W bit set
to 0.
- The start byte is followed by
24-bit control word. Bit 23 in the control word has to be 0 as it is a write
operation.
- The 24-bit control word is
then followed by the data bytes. The length of the data byte depends on the
DLEN field.
- While sending data
bytes, the LSB byte is sent first. Refer below examples for more
details.
- 16-bit/32-bit write –
The data sent is written to the address mentioned in Control
Word.
- 64-bit Write – 64-bit
is treated as two 32-bit writes. The address mentioned in Control
word is taken as Addr 0. Addr 1 is calculating internally by MCF8316A
by incrementing Addr 0 by 2. A total of 8 data bytes are sent.
The first 4 bytes (sent in LSB first way) are written to Addr 0 and
the next 4 bytes are written to Addr 1.
- If CRC is enabled, the packet
ends with a CRC byte. CRC is calculated for the entire packet (Target ID + W
bit, Control Word, Data Bytes).
- I2C stop
condition.