3

First of all: sorry for the title, I don't know how to describe further...


Background:

I'm working with the RDA5807M FM receiver chip. It worked fine for at least one month now. I just had jumper wires as connection, and now that the software is finished and I also have all hardware components ready I soldered wires onto an adapter for the GPIOs.

Accidentally from then I got strange results from i2cdetect:

$ i2cdetect -y 1

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

Before it was correct:

$ i2cdetect -y 1

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

As you can see, the chip is responding on the addresses 0x10 and 0x11, but not on 0x60, which is the address for TEA5767 compatible mode.

Just strange:

I got it then working again for a short time by reordering the wires, and then it stopped working again. Then I found out i2cdetect will find the chip under address 0x60 when I put the I2C bitrate to 2kHz or higher, but then the chip can't be controlled over i2cget, i2cset or the Python smbus library anymore.

Now after I had the Pi on for the half day but idle (I was not using it) I happily saw, that the chip is working again, even after a reboot.

Conclusion:

  • Worked fine for a long time
  • Stopped working
  • Wires reordered, worked again for a short time
  • Stopped working again
  • Chip is now detectable with higher I2C bitrate only
  • Working again after some time being idle

Can someone explain this strange behaviour at least in small parts (even if it's working for now)?

linusg
  • 442
  • 6
  • 17

1 Answers1

2

Strange I2C behaviour ... sorry for the title, I don't know how to describe further

Well, in the last couple of months playing with a couple of I2C devices, I have been in the same trouble as yours. First,a more specific title could be "A Intermittently Unreliable I2C Device Address Detection Problem".

Accidentally from then I got strange results from i2cdetect: $ i2cdetect -y 1

At first I found the intermittent unstable i2cdetect results strange. After troubleshooting for a very long while, I found three main causes:

(1) Too many devices on the same I2C bus, resulting the equivalent pullup resistance too strong for the Rpi I2C circuit can handle. Rpi I2C already has built in 1k8 pullup, but adding more and more devices even with usual weaker 10k or 4k7 pullups could push Rpi over its limit, causing "strange" performance,

(2) Too long connecting wires, say more than 30cm, casually laid out, without twisting pair configuration etc, beside acting as an antenna, picking up noise nearby, increase total capacitance, again over the impedance driving limit of Rpi or its buffer friend such TSX/TBX010x.

(3) Individual devices are themselves unstable. I once tested ten I2C MCP23017s, from a couple of difference shops, some through hole, some SMD breakouts. I found some are good guys with almost zero percent problem. Some are bad guys, with over 80% percent chance causing trouble, by themselves or in a group. And there are middle of the road.

I think someone with the skill set to investigate would consider it a serious task. – goldilocks2017jan02
I simply can do nothing but pray for it to work ... – linusg 2017jan02

Ages ago I completed a 3 year full time electronics engineering diploma from a vocational college, and then earned my living as a maintenance technician, troubleshoot electronics hardware day after day. I got bored very soon and was not getting serious at my task, and prayed every morning that no broken equipment to fix that day, ...

tlfong01
  • 4,847
  • 3
  • 12
  • 24