Page 1 of 1

Random I2C issue

Posted: Tue Dec 17, 2019 6:31 pm
by FrancisL
We made some boards with ESP32 + I2C device. We tested our firmware on 20 prototypes without encountering any problem.

We launched this week a first production, and tested the final boards...and we are now encountering some strange problems with I2C communication (master with a close single slave):
- some boards work fine (100%),
- some boards do not work at all (I2C communication always fails),
- most of the board work randomly (typically 1/3 of the I2C write work, 2/3 fail..).
Nothing special to say... we tried I2C_0 and I2C_1 and have the same behaviour. We tried different bit rates without seeing any improvement.
Any idea/suggestion?
Thanks for your help

Re: Random I2C issue

Posted: Tue Dec 17, 2019 8:34 pm
by genedyne
Have you seen this issue?
This will only apply if you are running git-master esp-idf.
I'd also suggest you slap an oscilloscope on the signals & check for clean transistions on the clock & data. You might need to adjust the pullups if these signals are noisy. Reducing the clock speed can also help if this is the issue.

Re: Random I2C issue

Posted: Wed Dec 18, 2019 3:59 pm
by FrancisL
Thanks for your answer. It seems that the problem was not at the ESP32 side (master) but within the slave device...
Everything works fine with the ESP32! Issue is closed.