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

Unterminated SPI bus needs expansion board to work properly

+5
−0

I'm supporting a piece of legacy hardware that routes the SPI bus through a set of headers to an expansion board. Since the expansion board doesn't actually use the SPI bus, we simply ignored the incoming SPI lines when we revised the expansion board.

However, we are now experiencing seemingly random errors on the SPI bus, as it communicates with two devices on the main board. Since there is no source or end termination present on the SPI bus, it makes me wonder if the extra capacitance of the expansion board was enough to prevent reflections.

The main board will not be revised for some time, so I would like to figure out what modification (extra capacitance? resistance?) I could make to the expansion boards that would help prevent SPI reflections, or if there are other possibilities that I'm not thinking of.

I should also mention that this is a low-power, battery-operated system. The top speed for SPI communication on this board is about 1MHz.

It seems like a similar question to this: https://electronics.stackexchange.com/questions/33372/spi-bus-termination-considerations

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Let's check if transmission line effects apply to your SPI bus. What's the raise time of the SPI dig... (3 comments)

1 answer

+4
−0

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 Ω 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".

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

Correct, the SPI bus works when the old expansion is connected (lots of extra stray capacitance), and... (4 comments)

Sign up to answer this question »