SLLSFI0C august 2021 – june 2023 MCF8316A
PRODUCTION DATA
The I2C data word format is shown in Table 7-7.
TARGET_ID | R/W | CONTROL WORD | DATA | CRC-8 | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A6 - A0 | W0 | CW23 - CW0 | D15 / D31/ D63 - D0 | C7 - C0 |
Target ID and R/W Bit: The first byte includes the 7-bit I2C target ID (0x01 by default, but can be modified by setting I2C_TARGET_ADDR), followed by the read/write command bit. Every packet in MCF8316A the communication protocol starts with writing a 24-bit control word and hence the R/W bit is always 0.
24-bit Control Word: The Target Address is followed by a 24-bit control bit. The control word format is shown in Table 7-8.
OP_R/W | CRC_EN | DLEN | MEM_SEC | MEM_PAGE | MEM_ADDR | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CW23 | CW22 | CW21- CW20 | CW19 - CW16 | CW15 - CW12 | CW11 - CW0 |
Each field in the control word is explained in detail below.
OP_R/W – Read/Write: R/W bit gives information on whether this is a read operation or write operation. Bit value 0 indicates it is a write operation. Bit value 1 indicates it is a read operation. For write operation, MCF8316A will expect data bytes to be sent after the 24-bit control word. For read operation, MCF8316A will expect an I2C read request with repeated start or normal start after the 24-bit control word.
CRC_EN – Cyclic Redundancy Check(CRC) Enable: MCF8316A supports CRC to verify the data integrity. This bit controls whether the CRC feature is enabled or not.
DLEN – Data Length: DLEN field determines the length of the data that will be sent by external MCU to MCF8316A. MCF8316A protocol supports three data lengths: 16-bit, 32-bit and 64-bit.
DLEN Value | Data Length | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
00b | 16-bit | |||||||||||
01b | 32-bit | |||||||||||
10b | 64-bit | |||||||||||
11b | Reserved |
MEM_SEC – Memory Section: Each memory location in MCF8316A is addressed using three separate entities in the control word – Memory Section, Memory Page, Memory Address. Memory Section is a 4-bit field which denotes the memory section to which the memory location belongs like RAM, ROM etc.
MEM_PAGE – Memory Page: Memory page is a 4-bit field which denotes the memory page to which the memory location belongs.
MEM_ADDR – Memory Address: Memory address is the last 12-bits of the address. The complete 22-bit address is constructed internally by MCF8316A using all three fields – Memory Section, Memory Page, Memory Address. For memory locations 0x000000-0x000800, memory section is 0x0, memory page is 0x0 and memory address is the lowest 12 bits(0x000 for 0x000000, 0x080 for 0x000080 and 0x800 for 0x000800)
Data Bytes: For a write operation to MCF8316A, the 24-bit control word is followed by data bytes. The DLEN field in the control word should correspond with the number of bytes sent in this section.
CRC Byte: If the CRC feature is enabled in the control word, CRC byte has to be sent at the end of a write transaction. Procedure to calculate CRC is explained in CRC Byte Calculation below.