PortDock

I2C troubleshooting, in order — pull-ups, address, voltage levels, clearing a stuck SDA, wire length

I2C device only NACKs or the bus hangs? Pull-up sizing (UM10204), 7-bit vs 8-bit addresses, 3.3 V vs 5 V levels, nine SCL pulses for a stuck SDA, 400 pF.

Tools for this guideParallel & Series Resistor Calculator web · no installMultimeter Reading Checker web · no install

I2C looks simple with two wires, but because «1» comes from open-drain outputs and pull-ups, and devices are picked by address, a failure can come from several places. The steps below go from the least effort up. Figures follow NXP's I2C specification UM10204 Rev. 7.

SymptomLikely causesCheck first
Every device NACKs (no ACK after the address)No pull-ups, address notation mix-up, missing power or GNDSteps 1–2
One device NACKsAddress pin (A0, A1) wiring, two devices at one address, voltage levelsSteps 2–3
Works, then hangs with SDA stuck at 0The master reset mid-read and a device still holds a 0Step 4
Occasional errors after lengthening the wiresMore bus capacitance slows the rising edge; noiseSteps 1, 5

1. Pull-up resistors

Devices only pull SCL and SDA down; the pull-ups make the 1 (UM10204 §3.1.1). Without them the lines never rise and no device answers. With power off, measuring SDA–VDD and SCL–VDD roughly shows the pull-up value. If every module carries its own pull-ups they add up in parallel and can get too small — check the combined value with the «Parallel Resistor Calculator».

Pick a value between two limits (UM10204 §7.1). Too small and devices cannot pull the line low; too large and the line's capacitance makes the rise slower than the specification allows.

Rp(min) = (VDD − VOL(max)) ÷ IOL      VOL = 0.4 V, IOL = 3 mA (Standard, Fast) / 20 mA (Fast-mode Plus)
Rp(max) = tr ÷ (0.8473 × Cb)           tr = 1000 ns (100 kHz) / 300 ns (400 kHz) / 120 ns (1 MHz)

Example: at 3.3 V, 400 kHz and 100 pF of bus capacitance, Rp(min) = (3.3 − 0.4) ÷ 3 mA ≈ 967 Ω and Rp(max) = 300 ns ÷ (0.8473 × 100 pF) ≈ 3.54 kΩ, so use a value in between. At 100 kHz the maximum widens to about 11.8 kΩ. Cb is the sum of wire, connector and pin capacitance; if unsure, start toward the smaller (faster) value and check the waveform.

2. Address

3. Voltage levels

Inputs read below 0.3 × VDD as 0 and above 0.7 × VDD as 1 (table 10). A 5 V device on a bus pulled up to 3.3 V needs 3.5 V for a 1, so it may not see 3.3 V as 1. Pull up to 5 V instead and a 3.3 V device's input may be over its maximum. Separate devices with different supplies with a bidirectional I2C level shifter. Some legacy devices have fixed 1.5 V / 3.0 V thresholds; check the datasheet.

4. Clearing a stuck bus (SDA held at 0)

If the master resets while reading, the device keeps holding SDA low, waiting for the next clock while sending a 0 bit. The master then cannot create a start condition and the bus looks hung.

5. Wire length, capacitance, noise

6. Checking with a logic analyzer

Sources

Published 2026-11-01