I2C Failure Requires Full Power Down To Recover

Hi, I’m having some odd problems with I2C sensors that I’m trying to get to the bottom of. Generally communication with the HTS221 on our board works fine, but in a small number of locations, we see the readings go haywire (over 100 percent humidity, over 100 degrees C). The sensor is still responding correctly with WHO_AM_I and calibraiton information requests, but the actual readings are a mess. Rebooting the sensor and/or the electron does not resolve the problem. Only a full power down (battery unplugged as well) will restore the system to valid temperatures and humidities.

I had been assuming that the problem is with the board or the HTS221, but I recently saw a different I2C device fail similarly.

Obviously, it could still be the board, but I’m wondering if it’s possible that something on the Electron is getting scrambled to the point where a full power down is required to restore it. Is that even a possibility I should be investigating?

Thanks

Looks like it was a failure of the I2C stack on the Electron. The devices were all remote, so I was getting limited information and it seemed to me like it wasn’t the entire I2C bus. Went to retrieve one and took a closer look. A call to Wire.reset() did the trick in the end.

1 Like