This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I2C Interface - Can't read data from a sensor

Other Parts Discussed in Thread: CC2541

Hi,

 

I tried to read register data from a sensor and the following is debug data I collected. I don't understand why I can't read data from the register (0x00) from the sensor.

0xA6 = Write Address for the sensor

0xA7 = Read Address for the sensor

I2CCFG 0x6A
1.  I2C_START()    // START BIT
2. I2CSTAT= 0x08
3. I2C_WRITE(0xA6)
4. I2CSTAT= 0x18 // SLA+W has been transmitted; ACK has been received
5. I2C_WRITE(0x0) //I2CCFG 0x4A
6. I2CSTAT = 0x28 // Data has been submitted and & ACK has been received
7. I2C_START() // Start Bit (I2CCFG  0x6E )
8  I2CSTAT = 0x08
17 I2C_WRITE(0xA7) I2CCFG 0x6E
18 I2CSTAT= 0x40
19 I2C_READ( d) I2CCFG 0x4E
20 I2CSTAT 0x50