Other Parts Discussed in Thread: INA226, , INA226EVM
I have a CC1352P-2 LaunchPad, Simplelink_cc13x2_26x2_sdk version 3.20.0.68, My project is based on the zed_switch example project.
I have my Launchpad connected to a Texas Instruments INA226. I'm using the I2C driver to read a register (register 0xFF) from the INA226. This 2-byte register contains the fixed value 0x2260. 95% percent of the time I read the correct value from the register.
Occasionally I read 0x22FF. I was able to see the transaction is a logic analyzer. When this problem occurs the INA226 returns only 1 byte, not 2. The CC1352P I2C driver doesn't give me an error it just fills the second byte with FF, so what I get back from the driver is 0x22FF.
In the logic analyzer I see the first byte (0x22) and an ack, but nothing following the ack. The second byte is not there, and the STOP is not there either. After the ack, the SDA and SCL lines stay low. This means the I2C driver (which is the master) stops driving the clock after it receives the first byte. This seems to be a problem with the I2C driver, not the INA226. I've attached a screen shot from the logic analyzer. Note the clock stops after the 0x22 and the ack.
Are you aware of any bugs in the I2C driver that would cause this?
Thanks,
Tim