Posts: 1
Joined: Tue Aug 09, 2016 1:24 am

i2cdetect stopped working

Tue Aug 09, 2016 1:40 am


I had set up my pi as an i2c master with two slaves. 1 Arduino and one MCP23017 i2c port expander. Both were working. Now neither are working! i2cdetect on the pi runs VERY slowly and sees nothing on the bus. Others with this problem online have cleared it by rebooting or by removing and reloading the i2c_dev and i2c_bcm2708 kernel modules, but neither of these methods works for me.
I see the following message repeated ad nausium in dmesg when I try to access the bus:
i2c i2c-1: transfer timed out

Is there anything else I should try? I'm pretty familiar with linux, but pretty new to electronics, so I'm afraid I somehow burned out a piece of my pi by hooking something up incorrectly. Any pointers on how I could test this theory without a duplicate pi would also be appreciated!

thanks, and happy hacking

Posts: 36
Joined: Tue Jan 10, 2012 11:16 am
Contact: Website

Re: i2cdetect stopped working

Thu Aug 11, 2016 1:22 pm

Interestingly I had exactly the same thing last night - I was debugging some external i2c hardware, and all of a sudden i2cdetect started running incredibly slowly - reading and displaying about 2 Addresses per second, so taking several minutes to complete a scan of the i2c address space.

What was causing it was an earthed scope probe I had connected to a GND pin on the Pi - I couldn't see why, though I suspect i must have set up some sort of ground loop or had perhaps introduced loads of interference onto the i2c bus?

Scope probe disconnected, and i2cdetect ran fine again.


Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7008
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: i2cdetect stopped working

Thu Aug 11, 2016 2:21 pm

SCL pulled low will result in permanent clock stretching which will be very slow.
SDA pulled low will result in all device addresses being seen, as the low is seen as an ack from each device.
Check your wiring.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

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