常見問題 > Embedded Computer ≫ Single Board Computer
I2C (from EC) - How to test the Read/Write Functions of I2C (from EC) under Windows OS.

Brief Description

IEI developed an EAPI Tool and SOP on how to tests the READ/WRITE Functions of the I2C under Windows OS. Please note that this IEI EAPI Tool can only be used with IEI SBC Boards where in the I2C is from the EC IC (not from PCH IC).


Solution

M24C32's 7bit I2C address was from 0x51. Convert to 8bit is 0xA2. (Please refer to Table 3. Device select code)


Examples:

EEPROM M24C32 Read/Write 1 Byte(0x55) to Byte address 0x0001. DevSel is 0xA2(8 bit).

Read :

1. Write first Byte address 0x00 to Function:0x04 Index:0x00.

2. Write second Byte address 0x01 to Function:0x04 Index:0x01.

3. Write '2' to Function:0x01 Index:0x64. Because Byte address is 2 byte.

4. Write '1' to Function:0x01 Index:0x65. Because will read 1 byte.

5. Write 0xA2 to Function:0x01 Index:0x61. (DevSel)

6. Write 0x01 to Function:0x01 Index:0x60.

7. Wait for Function:0x01 Index:0x62 to become 0x80.

8. Read data from Function:0x04 Index:0x00.

Write:

1. Write first Byte address 0x00 to Function:0x04 Index:0x00.

2. Write second Byte address 0x01 to Function:0x04 Index:0x01.

3. Write date 0x55 to Function:0x04 Index:0x02.

4. Write '3' to Function:0x01 Index:0x64. Because Byte address is 2 byte and will write 1 byte.

5. Write '0' to Function:0x01 Index:0x65.

6. Write 0xA2 to Function:0x01 Index:0x61. (DevSel)

7. Write 0x01 to Function:0x01 Index:0x60.

8. Wait for Function:0x01 Index:0x62 to become 0x80.

Remark

Kindly refer to the attached file for the SOP/Documentation of the IEI EAPI Tool.

 

Your browser does not support PDF.click here to download

 


2023/05/02
Back