×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

I2C, debugging problem

I2C, debugging problem

I2C, debugging problem

(OP)
Hi,

I have a problem with an I2C bus. For whatever reason, it will not start as it lays on the PCB. However, touching the SDA line with a scope probe kick-starts it, and from that point, it runs as expected even with the probe removed. If the scope probe is physically connected to SDA on system power-up, the I2C bus will start/operate as expected. So, sort of a catch-22, in that by attempting to monitor SDA, Im preventing the problem. Fyi- touching SCL with the probe has no effect in this context.

Im not an I2C expert, so Im trying to understand why the scope being connected to SDA is all that is required to start the system. Presumably, lower capacitance is better, and the scope has about a 10Meg input resistance, so it should not do much in the way of signal skew etc. But obviously, it must.

The setup is a single Master, single slave, 3K pullups on SDA/SCL to 5V, signaling verified as well within low/high requirements, running 100Khz. Trace length is < 3".

Any ideas? Im lost.

Best-
Rob
 

RE: I2C, debugging problem

I hate I2C.. I have to do one soon myself.  I much prefer SDI.

Anyway.  Touching with a scope probe causes a sudden transition which is causing a state change needed for your software/hardware to 'proceed'.  You need to look at your code and specifically the boundary, or initial conditions, to see what happens on boot and what a state reversal means to it.  Perhaps you haven't set the the master's pin direction correctly and once an input transition occurs your code then starts handling the pin direction correctly.

One other possibility is your hardware is in some fault state that is latching up the hardware? The sudden transition is getting it past the bad initial conditions.  

Keith Cress
kcress - http://www.flaminsystems.com

RE: I2C, debugging problem

(OP)
Hi Keith

That was my initial thought also- and I found that by touching SDA to ground briefly, that would get things rolling. But, even if the DSO is connected to SDA (i.e. wire soldered to SDA-side of pullup- to the DSO probe), the system will function correctly- where, in theory, the DSO is not producing any transition event.

In fact, on powerup, the SDA/SCL lines should pullup to 5V before the MCU/slave are even internally happy, so any initial bounce or whatever that may come from loading via the probe should be gone way before any bus start event is called.

Very confusing.
 

RE: I2C, debugging problem

Your scope is a 10 Megohm (or lower) load, so that may be just enough of a connection to ground to get you started.  

It sounds like you may have a floating channel because the output on your single master is not active.  As it said, check your initialization conditions.  

My $0.02

John D

RE: I2C, debugging problem

Connect a 100k resistor to ground and see if the comms become reliable upon start-up... remove the scope from the equation.

Dan - Owner
http://www.Hi-TecDesigns.com

RE: I2C, debugging problem

Don't just focus on the resistive impedance of the scope probe.  The typical scope probe has a chunk of capacitance as well.   

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: I2C, debugging problem

(OP)
OK, problem seems resolved with more capacitance on SDA. Strange, because the spec says 10pF, and I had tried that very early on- up to 27pF, attempting to emulate the probe's characteristics, with no luck. However, it will start with 100pF on SDA. The silicon engineers are looking into it now... I'd better look into my scope probe's actual capacitance! lol.

I tried 20K-100K pulldown on SDA, but that did not help, so it does not seem to be a float problem.

Thanks all for the help- much appreciated.

Regards,
Rob

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources