source_i2c_misconfigured_error

Diagnostic signature

source_i2c_misconfigured_error

Emitted when incompatible I2C pins, such as Serial Data (SDA) and Serial Clock (SCL), are erroneously connected to the same electrical network.

What it means

In a tscircuit schematic or PCB design, interfaces defined with specific I2C roles are validated against basic protocol topologies. The source_i2c_misconfigured_error indicates that two pins belonging to conflicting parts of the I2C bus, specifically a serial data line (SDA) and a serial clock line (SCL), have been assigned to the exact same electrical net. This represents a topological error that will short the communication bus, as I2C strictly requires independent and distinct signal networks for its synchronous clocking and bidirectional data transfer.

Why it happens

During the evaluation phase, the tscircuit compiler resolves net connections and groups ports into distinct electrical networks. It inspects the source_port metadata attached to each resolved net. If it detects a single net that contains port IDs explicitly mapped to both an SDA function and an SCL function, the circuit-json builder generates this error. This typically occurs when a trace connects the wrong chip pins together, when a pinLabels prop misidentifies the bus lines, or when an accidental short circuit is created through shared net aliases.

Minimal reproduction

export const MisconfiguredI2c = () => ( <board width="20mm" height="20mm"> <chip name="U1" pinLabels={{ "1": "SDA", "2": "SCL" }} /> <trace from=".U1 .SDA" to=".U1 .SCL" /> </board> );

How to fix it

Remove traces or shared nets that bridge SDA and SCL pins, ensuring that data and clock lines are routed independently to their respective bus networks.

```tsx
export const FixedI2c = () => ( <board width="20mm" height="20mm"> <chip name="U1" pinLabels={{ "1": "SDA", "2": "SCL" }} /> <chip name="U2" pinLabels={{ "1": "SDA", "2": "SCL" }} /> <trace from=".U1 .SDA" to=".U2 .SDA" /> <trace from=".U1 .SCL" to=".U2 .SCL" /> </board> );
```

Step 1

Step 2

Step 3

Upstream references

circuit-json [email protected] — SourceI2cMisconfiguredError — retrieved 2026-08-11

source_i2c_misconfigured_error.ts Source Declaration