0

I am using a Raspberry Pi4 - 4GB (exact model: Raspberry Pi 4 Model B Rev 1.4) with following configuration:

AME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Linux musselv5 5.10.63-v7l+ #1488 SMP Thu Nov 18 16:15:28 GMT 2021 armv7l GNU/Linux

Error: I am using the RPI together with a tca9548a multiplexer for months and everything was running fine but suddenly the command i2cdetect -y 1 takes around 2 min to scan the addresses and shows no sensor connected (with and without the multiplexer connected).

I've tried:

  • Resetting the i2c bus with rmmod and modprobe
  • Increasing the clock speed from 10kHz to 400kHz
  • Updated the system with apt-get update and upgrade

On the custom-built tca9548a board, I am not using any pullups. However, on the PCBs 'behind' the multiplexer, I am using 10k on SDA and SCL.

I'm surprised because this setup was working and I have 3 more that are working.

EDIT: Pulled down SCL could be an issue but that's not the case for my setup: https://github.com/raspberrypi/linux/issues/1467

I ran a gpiotest according to the manual provided by @joan on the problematic RPI4 and got following output: Problematic RPI4 - gpio test

Testing... Pull up on gpio 2 failed. Pull up on gpio 3 failed. Skipped non-user gpios: 0 1 28 29 30 31  Tested user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  Failed user gpios: 2 3

So the test gave the result that the I2C connection is problematic.

I did the same test on a working RPI4 and it didn't report an error for the I2C connection:

Testing... Write 0 to gpio 8 failed. Pull up on gpio 9 failed. Pull down on gpio 14 failed. Pull down on gpio 15 failed. Pull up on gpio 18 failed. Pull up on gpio 23 failed. Skipped non-user gpios: 0 1 28 29 30 31  Tested user gpios: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  Failed user gpios: 8 9 14 15 18 23

It's strange that for the working RPI4, I2C addresses are recognized earlier using i2cdetect -y 1:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 
50: -- -- -- 53 -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: 70 -- -- -- -- -- -- -- 

Than for the 'problematic' RPI4:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --  
7
  • Why isn't pulled down SCL an issue? How do you know? Have you checked the GPIO for damage? elinux.org/R-Pi_Troubleshooting#Testing
    – joan
    Jan 14 at 9:48
  • @joan good point! I haven't verified, I'll carry out the suggested test. Thank you. Jan 14 at 10:01
  • @joan in the manual it reads nothing should be connected. The installation is placed remotely, which involves some effort in unplugging everything. Is there a potential harm in running the script with I2C connected? Jan 14 at 10:07
  • No, but the results might be misleading.
    – joan
    Jan 14 at 10:11
  • @joan thank you joan, the result of the gpiotest was that the i2c connection is problematic. I'll go and get the RPI and test it unplugged. It is the first time that I am experiencing problems with the I2C bus driver. Any idea what could be the error source? Jan 14 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.