I²C pull-up resistors at 400 kHz

The 10 kΩ pull-ups take 847 ns to raise the line. At 400 kHz the bus allows 300 ns. A 3.3 V bus with about 100 pF on each line, timed from 0.3 to 0.7 VDD as the I²C specification times it. Drag the edge where SDA reaches 0.7 VDD to another resistor:

10 kΩ: 847 ns

Rise time

The MCU and the sensor can only pull SDA and SCL low. When they let go, RSDA has to charge the line's capacitance CSDA on its own, and the time that takes grows with the product of the two.

At 100 kHz an 847 ns edge fits inside the 1000 ns Standard-mode allows. At 400 kHz the edge outlasts the 300 ns the specification allows, so SDA may still be under 0.7 VDD, the lowest level UM10204 counts as high (Table 10), when the sensor reads it.

SDASCLU1MCUSDASCLU2SensorRSDA10kRSCL10kCSDA100 pFCSCL100 pF3.3 V

Choosing a pull-up

2.2 kΩ raises the line in 186 ns, and needs 1.3 mA at 0.4 V, within Fast-mode’s guaranteed minimum sink of 3 mA.

    Any standard value from 1 kΩ to 3.3 kΩ fits; 2.2 kΩ leaves room. 3.3 kΩ only just fits, at 280 ns, if the 100 pF estimate is right. 2.2 kΩ still fits up to 161 pF.

    Where 0.8473 comes from

    Released at t=0, the line charges towards VDD as V(t)=VDD(1−e−t/RC). It crosses 0.3 VDD at t1=RCln⁡10.7 and 0.7 VDD at t2=RCln⁡10.3, so

    tr=t2−t1=RCln⁡0.70.3=0.8473RCb=0.8473⋅10kΩ⋅100pF=847ns

    The bounds follow: Rmax=tr/(0.8473Cb), which is 3.54 kΩ at 400 kHz, and Rmin=(VDD−0.4V)/IOL, which is 967 Ω assuming only the minimum guaranteed sink of 3 mA at 0.4 V.

    The limits per mode

    ModeRise time, maxBus capacitance, maxGuaranteed sink at 0.4 V, minPull-up, min at 3.3 VPull-up, max at 100 pF
    Standard-mode100 kHz1000 ns400 pF3 mA967 Ω11.8 kΩ
    Fast-mode400 kHz300 ns400 pF3 mA967 Ω3.5 kΩ
    Fast-mode Plus1000 kHz120 ns550 pF20 mA145 Ω1.4 kΩ

    For this 100 pF example, the bounds assume only the minimum guaranteed sink of 3 mA at 0.4 V. At the full 400 pF bus load, 400 kHz needs 6 mA at 0.6 V (UM10204 Table 10, footnote 4).

    A longer cable brings each line to 200 pF. What should the pull-ups be at 400 kHz?

    RightWrong

    2.2 kΩ now takes 373 ns. 1.5 kΩ takes 254 ns and sinks well under 3 mA; the next value up, 1.8 kΩ, takes 305.

    Limits from the NXP I²C-bus specification UM10204, Rev. 7.0: Table 10 (thresholds, 3 mA at 0.4 V), Table 11 (rise time, bus capacitance) and Section 7.1 (0.8473 and the pull-up bounds). VDD = 3.3 V and 100 pF per line are assumptions for an illustrative board; the model is an ideal RC charge, with no pin leakage and no current-source or switched pull-ups.