Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

75%
+4 −0
Q&A Unterminated SPI bus needs expansion board to work properly

At 1 MHz it's probably not transmission line effects. It's not clear from your question whether the SPI bus works on the main board with the expansion board connected, but not when it's not connec...

posted 2y ago by Olin Lathrop‭

Answer
#1: Initial revision by user avatar Olin Lathrop‭ · 2022-12-30T20:37:29Z (almost 2 years ago)
At 1 MHz it's probably not transmission line effects.

It's not clear from your question whether the SPI bus works on the main board with the expansion board connected, but not when it's not connected.  If so, I expect you're right about the additional capacitance.  An easy way to check this is to add a little deliberate capacitance on each SPI line to ground.  Perhaps you can do this with an expansion board connector that only has the caps and doesn't connect to any expansion board.  Or solder two caps to the bottom of the expansion connector pins.

I'd start with 100 pF caps.  If your SPI drivers have 100 &Omega; output impedance, that's a time constant of 10 ns.  95% settling requires 3 time constants, so 30 ns.  You say the SPI bus is running at 1 MHz, so 500 ns levels.  30 ns is a small time compared to that.

If adding deliberate caps instead of the expansion board does make the SPI more robust, then it would be good to understand why.  Again, I expect it's not transmission line reflections, especially since it gets better when you make the lines longer.  My guess is crosstalk.  Capacitance on the lines lowers their impedance at high frequencies, reducing the noise from capacitively coupled edges.

Still, this shouldn't be happening on a reasonably designed circuit board.  I suspect the real problem is bad layout.  Do you have a board-wide ground plane?  Do all ICs have bypass caps between their power and ground pins, physically close to those ICs?  Are the SPI lines straight within reason?  I expect that after some investigation you'll find the answer to one or more of these questions to be "no".