ERC gives a bunch of errors for multiple ICs connected to SPI bus

Hello all,

I’m designing a temperature logging board with 4 8 SPI chips and I get errors because all the SDO pins are connected. (MISO SPI pins)

Is this a matter of me having the warning/error system set up wrong or what?

I don’t see anything wrong with this in practice as this is how the SPI bus works.

You didn’t post what the error messages are so we can only guess. But the most likely cause is that the electrical types of the SPI pins are incorrect.

1 Like

You might want to read this FAQ entry: Electrical type of schematic symbol pins (KiCad 4 and KiCad 5)

1 Like

Hi, here’s an ERC report:

ERC report (9/5/2018 2:30:23 PM, Encoding UTF8 )

***** Sheet /
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (207.01 mm,234.95 mm): Pin 14 (Input) of component U9 is not driven (Net 1).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (129.54 mm,232.41 mm): Pin 15 (Input) of component U7 is not driven (Net 2).
ErrType(5): Conflict problem between pins. Severity: error
@ (129.54 mm,227.33 mm): Pin 17 (Output) of component U7 is connected to
@ (207.01 mm,227.33 mm): pin 17 (Output) of component U9 (net 4).
ErrType(5): Conflict problem between pins. Severity: error
@ (207.01 mm,227.33 mm): Pin 17 (Output) of component U9 is connected to
@ (226.06 mm,97.79 mm): pin 11 (Output) of component U3 (net 4).
ErrType(5): Conflict problem between pins. Severity: error
@ (226.06 mm,97.79 mm): Pin 11 (Output) of component U3 is connected to
@ (297.18 mm,97.79 mm): pin 11 (Output) of component U5 (net 4).
ErrType(5): Conflict problem between pins. Severity: error
@ (297.18 mm,97.79 mm): Pin 11 (Output) of component U5 is connected to
@ (241.30 mm,181.61 mm): pin 17 (Output) of component U8 (net 4).
ErrType(5): Conflict problem between pins. Severity: error
@ (241.30 mm,181.61 mm): Pin 17 (Output) of component U8 is connected to
@ (297.18 mm,40.64 mm): pin 11 (Output) of component U4 (net 4).
ErrType(5): Conflict problem between pins. Severity: error
@ (297.18 mm,40.64 mm): Pin 11 (Output) of component U4 is connected to
@ (163.83 mm,181.61 mm): pin 17 (Output) of component U6 (net 4).
ErrType(5): Conflict problem between pins. Severity: error
@ (163.83 mm,181.61 mm): Pin 17 (Output) of component U6 is connected to
@ (226.06 mm,40.64 mm): pin 11 (Output) of component U2 (net 4).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (201.93 mm,215.90 mm): Pin 1 (Power input) of component #PWR020 is not driven (Net 5).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (226.06 mm,200.66 mm): Pin 3 (Power input) of component U8 is not driven (Net 14).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (307.34 mm,118.11 mm): Pin 8 (Power input) of component U5 is not driven (Net 17).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (312.42 mm,118.11 mm): Pin 5 (Power input) of component U5 is not driven (Net 18).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (151.13 mm,200.66 mm): Pin 2 (Power input) of component U6 is not driven (Net 19).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (49.53 mm,26.67 mm): Pin 1 (Power input) of component #PWR0103 is not driven (Net 25).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (191.77 mm,246.38 mm): Pin 3 (Power input) of component U9 is not driven (Net 26).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (116.84 mm,246.38 mm): Pin 2 (Power input) of component U7 is not driven (Net 27).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (241.30 mm,66.04 mm): Pin 1 (Passive) of component C8 is not driven (Net 36).
ErrType(2): Pin not connected (and no connect symbol found on this pin)
@ (60.96 mm,50.80 mm): Pin 19 (Passive) of component P1 is unconnected.
ErrType(2): Pin not connected (and no connect symbol found on this pin)
@ (73.66 mm,38.10 mm): Pin 10 (Passive) of component P1 is unconnected.
ErrType(2): Pin not connected (and no connect symbol found on this pin)
@ (73.66 mm,35.56 mm): Pin 8 (Passive) of component P1 is unconnected.
ErrType(8): Global label not connected to any other global label
@ (29.21 mm,40.64 mm): Global label GPIO17 is not connected to any other global label.
ErrType(2): Pin not connected (and no connect symbol found on this pin)
@ (60.96 mm,40.64 mm): Pin 11 (Passive) of component P1 is unconnected.
ErrType(2): Pin not connected (and no connect symbol found on this pin)
@ (60.96 mm,45.72 mm): Pin 15 (Passive) of component P1 is unconnected.
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (78.74 mm,24.13 mm): Pin 1 (Power input) of component #PWR01 is not driven (Net 58).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (236.22 mm,118.11 mm): Pin 8 (Power input) of component U3 is not driven (Net 61).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (241.30 mm,123.19 mm): Pin 1 (Passive) of component C9 is not driven (Net 62).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (312.42 mm,60.96 mm): Pin 5 (Power input) of component U4 is not driven (Net 71).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (236.22 mm,60.96 mm): Pin 8 (Power input) of component U2 is not driven (Net 72).
ErrType(3): Pin connected to some others pins but no pin to drive it
@ (307.34 mm,60.96 mm): Pin 8 (Power input) of component U4 is not driven (Net 73).

** ERC messages: 30 Errors 7 Warnings 23

I’m using global labels to connect everything. Maybe this is the issue?
It all connects to a 2x20 pin RPi header that does not have any defined current direction (AFAIK)

You have several kinds of problems with pin types, read the FAQ linked by @Rene_Poschl.

Thanks for taht link. That explains it.
It is what I suspected, conflicting pin-type definitions.
I assume that is is safe to ignore it then(?), as I am sure that my schematic is correct.

Pretty sure? :wink: I don’t think anyone here is going to tell you that it is safe to ignore errors, especially when we haven’t seen the schematic. It is easy to fix these errors, why would you choose to ignore them? You’ll only encounter the same issues next time you use those symbols in a schematic.

4 Likes

As a start check the datasheet. But you should redefine SDO to tristate. If an SPI does not tristate its MISO pin. Its something you want to provision for. (A few still exist)

2 Likes

Hi all,

I’m working on a new revision of this project.
I have 4 MAX31856 and 4 MAD31865 connected together, not daisy chained.
The MISO/SDO pin is marked as an output and MOSI/SDI is marked as an input.
This causes the DRC to complain.

Should I just set it to tri-state or bidirectional to solve this issue?
As far as I can see, most SPI devices are configured as input/outputs, which would cause the same problem when having more ICs on the SPI bus.

Can this be right?

And by the way, I don’t have write permission to edit the library in windows.
How do I get around that?

Do not modify symbols that are from the official library. Copy them into your personal lib and modify them there.

If you find an error like here then it would be nice to also fix it in the official lib. For that head over to github and create a pull request with your fix. (At the least report the bug as an issue)

MISO should be tri-state on the slave device, both in reality and in KiCad.
MOSI should be input on the slave device, both in reality and in KiCad.
On the master device, ideally it MISO should be input and MOSI should be output. But realistically on many µP the pins are GPIO being used for SPI, so should probably be bidirectional.

KiCad’s ERC might not actually show the source of the problem. Often the problem is ambiguous intent. The devs haven’t activated the mind-reading features yet so the ERC doesn’t know your intent. :rofl:

If there are multiple of the same problem on one net it will only show an ERC flag at one spot of the net. Check all the pins on the full net, otherwise you may be chasing the problem through your schematic until all the offending pins are corrected.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.