Hi all,
Using a ESP32 connected to two devices on I2C I get very erratic behaviour. I have a PCF IO expander and a SI570 Controllable oscillator.
I have the I2C lines on IO 22+23 and a 330ohm pullup resistors. On first power-up, it seems to work, but then things go bad.
Attached is from a Logic analyser.
The transaction to the IO expander works 99% of the time, but that is simple.
First power-up on the SI570 Oscillator, although I do have to re-try transactions once. (there is one NACK instead of ALL nack)
In the bad cases, I get NACK and then I try 10 times to write to the address. The Bus recovers after a while and I have no idea why.
I2C Reliability -
I2C Reliability -
Last edited by RichardP on Tue Aug 07, 2018 8:37 am, edited 1 time in total.
-
- Posts: 9746
- Joined: Thu Nov 26, 2015 4:08 am
Re: I2C Reliability -
Not sure if your pictures work... but 330 ohm seems awfully low for pullup resistors. Maybe try making these a bit higher to, say, 2K2 or 1K or so?
Re: I2C Reliability -
Hmm.. pictures went funny... The pullup is a 3k3 (it was a typo) - but its not the ESP32. I have got down to the Si570 not working properly if the CLK+ line is not terminated. (I left it floating, I added a load to the CLK+ line and it seems to be better)
Regards,
Richard
Regards,
Richard
-
- Posts: 9746
- Joined: Thu Nov 26, 2015 4:08 am
Re: I2C Reliability -
Check, glad to hear you solved it!
Re: I2C Reliability -
Unfortunately not... I thought it was working... It ran for hours until I powered off for the night. The next day the problems were back.
I put the I2C bus on a scope and I can see glitches on the bus.. they are always there, just some slave devices are more sensitive than others. I have cloned the latest ESP-IDF code but yet to try (I am away and will only be back at the weekend)
In the meantime I have added a bitbanged software I2C driver to my project to see if things change.
Best Regards,
Richard
I put the I2C bus on a scope and I can see glitches on the bus.. they are always there, just some slave devices are more sensitive than others. I have cloned the latest ESP-IDF code but yet to try (I am away and will only be back at the weekend)
In the meantime I have added a bitbanged software I2C driver to my project to see if things change.
Best Regards,
Richard
Who is online
Users browsing this forum: No registered users and 79 guests