mathiask
Posts: 10
Joined: Mon Feb 11, 2013 10:46 am
Location: Germany

I2C Bus hangs after ~60sec idle time

Thu Dec 17, 2015 6:49 pm

Hi,

I got a RPI 2 with a MotorHAT and ADS1015 from Adafruit. If both boards are connected to the I2C bus it looks like the bus hangs after ~60s idle time. If I do a i2cdetect -y 1 the bus and the boards work again if there is no idle time again.

Anybody an idea? I am at my wit's end.

Best regards

mathiask
Posts: 10
Joined: Mon Feb 11, 2013 10:46 am
Location: Germany

Re: I2C Bus hangs after ~60sec idle time

Thu Dec 17, 2015 8:46 pm

Small addition:
calling fd = open("/dev/i2c-1", O_RDWR) and ioctl(fd, I2C_SLAVE, address) works, but after that the i2c_smbus_read_byte_data(...) returns -1(EPERM) AFAIK this error raises if the i2c master is locked by another connection. For me this seems as odd as the idle time until this error occures :/

mathiask
Posts: 10
Joined: Mon Feb 11, 2013 10:46 am
Location: Germany

Re: I2C Bus hangs after ~60sec idle time

Thu Dec 17, 2015 9:54 pm

I'm so glad I finally found the fault that kept me busy for 3 hours. I got a loose contact in my wiring and the small vibrations of my NAS on my desk were enough to trigger the error somtimes -.-

Nevertheless thanks for reading and always check your wiring :P

Return to “Interfacing (DSI, CSI, I2C, etc.)”