Reset i2c bus

Hi,

I write some application, that collects temperature, humiduty etc, and send it to cloud server. I start my controller. It works fine for about one day, then i2c bus stops responding. So… I restart controller, but after a some time the situation was repeated. Logs says, that I can’t read data from i2c bus.

I will check the code. Maybe it’s some of slave device not free the bus. The process will be difficult. But, if slaves did not stops responding I try let to slave to complete unfinished transaction as described in the AN-686 from AnalogDevitses.

Have someone experience restart/reset i2c bus? Maybe I’m missing something in my analysis of the situation?

Regards,
Nikolay

I suspect this is your slave device. I have an ADC connected via I2C with a G400 and I am sampling about 10 times per second and it runs for weeks. I have a number of other with G120 and G400 all doing I2C without any failures.

Your link shows the way to reset it. I don’t see this in the GHI driver so you may have to release the IO pins and then bit bang this yourself. Solution 1 may work and as this is software only, no need to change any hardware.

I thing that my problem go from Chronodot… :frowning: Now the bus is not working immediately after I powerup controller with Chronodot connected. If I disconnect it and reboot controller - all works normally. Maybe board is broken.

I made my own Chronodot:

:wink:

@ Architect - I need watchdog timer to reset board but my Mountaineer does not have it. So I want to use DS3231 with alarm-interrupt pin.