Jump to content
  • 0

I2C with clock stretching issue with certain combinations of SCL/SDA


jostikas

Question

AD3 - Nothing except USB cable connected
Waveforms 3.22.22

I seem to have no luck picking combinations of I2C SCL and SDA for my test board. I chose SCL=1, SDA=8.

Issue:

SCL/SDA combinations with SCL=DIO1 and SDA anything but DIO0 give "Error! (Start 2000)", if clock stretching is enabled.

Steps to recreate:

  • Open included project
  • Set DIO Pull to "Up" (if already set, set to "Down" and back "Up", it doesn't seem to apply on project loading)
  • Run the open script
  • check that the row where `scl=1` contains "Fault" values
  • See the errors in Protocol log.

Checking with logic analyzer:
Expected output:image.png.53961a111ac4d5fe3caf04a43f1db38e.png

 

With SCL=1, SDA=2:

image.png.bddfc7381d802157d88e35db2f0a6378.png

With SCL=1, SDA=3:

image.png.4bacac0f02368c7d81d06905d4bc1fdc.png

The clock pattern in logic analyzer seems to depend on the value of the SDA, with frequency falling as SDA value reaches 7. Starting from then, no change.

I2C clock stretching bug.dwf3work

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @jostikas,

I have verified your results (specifically the I2C.Read returning a Start 2000 Error) with my own AD3 and ADP3450 when Clock Stretching is enabled.

I am not familiar with the internals to know why this is the case, but I will be sure to ask Attila about this once he gets back from vacation later this month.

Thanks,
JColvin

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...