Hi, I am using my Photon with the new Power Shield, a MPL3115A2 and a HTU21D-F. Every 60 seconds I read the sensors and post the values to Thingspeak. This works great but after a few hours i2c stops working. I receive the value 998 from my HTU21D-F which indicates that i2c timed out.
First I thought it is because I control the power of my sensors with a NPN2222 transistor. But switching to continous power didn’t solve the issue.
After the 998 I do not receive any further data. Only disconnecting the power from the Photon helps.
Edit:
Particle CLI did not work: Cannot open DFU device 0a5c:217f
But I managed to use Particle Dev to connect to the Photon and press ‘v’ to get the system firmware version.
The output is: system firmware version: 0.4.4
The STM32F205 processor errata says there are problems with i2c and the 0.4.4 has the work-arounds that Particle thought would be the best, but there still could be problems, particularly with multiple i2c devices over a long period. The battery gauge thread also shows some problems even with 0.4.4.
Another user reported that they could get out of the bad state by doing this when it gets stuck:
I am not sure if I did what I should do
First I tried it without the row Wire.begin(); but that did not change anything
After adding Wire.begin(); it works better. When I receive the value 998 it takes about 5 to 10 minutes to continue sending correct values again.