This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Probing I2C SCL line from CRO causing I2C to stop working

Other Parts Discussed in Thread: MSP-EXP430FR5739, MSP430F5438

Hi,

I am trying to probe the I2C communication between MSP-EXP430F5529 and MSP-EXP430FR5739,

The I2C communication is working very well between these two msp controllers. But the problem is when I try to interface MSP-EXP430F5529 with an RTC (DS1337) the communication is not happening.

So using the oscilloscope, I wanted to probe the I2C lines for the first case (i,e between MSP-EXP430F5529 and MSP-EXP430FR5739) to confirm the data transaction and then to try it over the second case (between MSP-EXP430F5529 and DS1337). But there is a strange problem here, If I am probing only SDA line I am able to capture the data signal on CRO, but when I start probing the SCL line the communication stops and I have to restart the board.

I am using 10k of pullup resistors for the I2C lines. and the CRO I am using is Hantek's PC-oscilloscope (DSO-2090 USB).

SInce to analyze the I2C data I need both data as well as clock lines signal, probing only SDA is like of no use :(.

Please let me know what could be the reason that SCL probing is causing failure.

  • Hi,

    chethu gowda said:

    the problem is when I try to interface MSP-EXP430F5529 with an RTC (DS1337) the communication is not happening.

    I changed the pullup resistance from 10k to 4.7k and the I2C is working fine with DS1337 :).

    But the problem with the oscilloscope exists in a different way now. In this case (i.e after changing the pullup resistance to 4.7k) the I2C communication is still working fine inspite of the oscilloscope probe is connected to I2C clock line but the scope is not capturing the waveform ;(. I have checked all the setting and connectivity, but not able to find wat d reason could be. Is the pullupt resistance has something to do with the oscilloscope's probe?

    The datasheet of the probe says that the i/p capacity of the probe is 85-115pF(X1 attenuation) and 18.5-22.5pf (X10 attenuation)..

  • chethu gowda said:

    The datasheet of the probe says that the i/p capacity of the probe is 85-115pF(X1 attenuation) and 18.5-22.5pf (X10 attenuation)..

     Hi, may be you are experiencing ground loop and or too much capacitance on lines.

     Probe capacitance can be the max parallel input acceptable amount when in 10:1.

     Best tools for this work is the saleae logic tools.

     Regards

  • It almost looks liek your probe is broken. Did you use the same probe/channel for the other (workign) line too? Or did you always use oen for SCL and one for SDA?
    Cheap probes with 1/10 switch sometimes shortcut the input ot flatten the output once the switch is used a few times.

    Normally, I2C should work fine with 10k pullups (or even 47k, if there are only two or three peers). 4,7k is pretty strong.

  • Hi Roberto Romano,

    The maximum i2c bus capacitance allowd is 400pF, since I am using the probes with 10x attenuation and with only one I2C slave, I dont think there is a problem with the bus capacitance. I should analyse further the same to make sure about the problem.

     

    Hi Jens-Michael Gross,

    According to many resources generally the pullup resistance will be between 1k to 10k. But nowhere I found the proper mathematical formula which can be used to derive this resistance value. So first I tried with 10k, since its failed I tried with 4.7k and it worked.

    Please let me know whats the proper way to calculate the pullup resistance in any circuit.

  • chethu gowda said:
    But nowhere I found the proper mathematical formula which can be used to derive this resistance value

    There is none. The pullup must be strong enough to provide the required input current so all attached peers accept the line as being 'high'. Back in TTL times, there was an input specification of 'TTL-Loads' or 'LS_TTL-loads'. A TTL input was drawing xµA adn if an output was prviding n*xµA otuput current without dropping below high threshold, it did have a fan-out of n. Sicne teh currents for TTL or LS-TTL were specified, it was easy to calculate th erequired pullup resistor for the given supply voltage (5V for (LS-)TTL), the high threshold voltage and  the typical TTL input current.
    However, these days, and especially with CMOS inputs, the currents are much lower in most cases (the MSPs inputs would have been almost negligible for a TTL output), so the pullup resistance can be much larger and still work perfectly.
    This is why I thought that 10k not being sufficient for an MSP and one slave is strange. It means that the slave must have significantly more than 100µA input current. It's actualyl twice of the old standard TTL maximum input current.

    chethu gowda said:
    Please let me know whats the proper way to calculate the pullup resistance in any circuit.

    Simple: Rpullup <= allowed voltage drop / input current.

    For an MSP430F5438's input pins, the maximum pullup resistance on VCC=3V is 0.9V/50nA = 18MOhm :)  (on VCC=3V, the maximum positive going threshold voltage is 2.1V -> 0.9V dropout voltage). However, this value is for an open input pin with no other things attached and no additional influences such as radio waves, signal crosstalk from adjacent pins etc.
    Th eMSPs internal pullups (if enabled) have ~50kOhm.

  • chethu gowda said:
    Please let me know whats the proper way to calculate the pullup resistance in any circuit.

     Hi, pullup in these day are completely driven by bus capacitance than current, input leakage in the range of few pA don't desturb a 100K pullup, a 10pF bus capacitance is far more bad.

     So from the max capacitance you can derive the maximum value of Pullup resistance in term of max rise time. I hope RC value has to be less than 1/3 of rise time.

     10K 400pF RC=4uS so rise time can be in the range of 12uS to be considered as extinguished.

     1K 400pF RC=400nS so take your consideration about transient wave.

     V(t)= Vcc*(1-e^(t/RC))

     Regards

  • Roberto Romano said:
    a 10pF bus capacitance is far more bad.

    You're right, in my calculations baove I only focused on static lines, ignoring the dynamic factor.

    However, I2C standard speed is 10 to 100kHz, Fast speed (2nd revision of the standard) allows 400kHz bus clock for devices that support it. And I think there is a 3rd version of the standard that specifies 1MHz. But few I2C devices allow such a high clock frequency. Moreover, the lowest device on the bus defines the maximum (or it wouldn't properly detect start and stop conditions and chances are that sooner or later misunderstandings happen).
    If using 1MHz, the rise time must not exceed 500ns. But then, the critical point is the high-going threshold voltage, not the maximum bus voltage. So timings relax a bit. Also, 400pF is quite large. It should be much, much less for just two peers.

    Test case: if in the original senario 10k pullup work if the I2C frequency is lowered by 50%, then either the slave does not allow the original high frequency (and worked only coincidentally), or there is a large parasitic capacitance on the line. If it still doesn't work, then there is a parasitic resistance on the lone (maybe a hair connection on the PCB, or shortcutting dirt). in both cases, the input capacitance and resistance of the scope probe may have pushed the signal over the edge.

  • Thank you very much Jens-Michael Gross..

**Attention** This is a public forum