Other Parts Discussed in Thread: C2000WARE
Hi TI technical team!!
There is a question related to I2C reading.
** the current situation
1) Subject to control
Master - F28388d
Slave - IIS328DQ
2) The progress.
Read/Write One byte of data
Please refer to the attached code..
3) Q&A
Case 1. Uncomment line 100 and comment line 101 in the code.
status = I2CRead(I2CB_BASE, 24, 32, buffer, 1, 5); // READ CTRL_REG1 TO CTRL_REG5 registers
//status = I2CRead_T(I2CB_BASE, 24, 32, buffer, 5); // READ CTRL_REG1 TO CTRL_REG5 registers
---> Read 1-byte data five times repeatedly.
---> Read the following five register values consecutively from the start point register address. Refer to Figure 1.
---> (ST / SAD + W / SAK / SUB / SAK / SR / SAD + R / SAK / DATA_n / NMAK / SP) X 5
Case 2. Comment line 100 and uncomment line 101 in the code.
//status = I2CRead(I2CB_BASE, 24, 32, buffer, 1, 5); // READ CTRL_REG1 TO CTRL_REG5 registers
status = I2CRead_T(I2CB_BASE, 24, 32, buffer, 5); // READ CTRL_REG1 TO CTRL_REG5 registers
---> The value of the start point register address is read 5 times (same value). See Figure 2.
---> (ST / SAD + W / SAK / SUB / SAK / SR / SAD + R / SAK / DATA1 / DATA1 / DATA1 / DATA1 / DATA1 / SP)
Q. I want to read multi-byte data and get the same result as Case 1.
---> (ST / SAD + W / SAK / SUB / SAK / SR / SAD + R / SAK / DATA1 / MAK / DATA2 / MAK / DATA3 / .... / DATA5 / NMAK / SP)
How can I modify the 'i2cRead_T' function in the attached code?
I need a help
Kind regard
JM LEE



