3

I have a circuit design coming together that uses either of 2 sockets to plug in a controller. The idea is to allow a user to enable either of the controllers to control a radio using SPI. In the design, the user is only allowed to plug in one controller or the other.

The SPI clock frequency is 25 MHz. I have 22 Ohm (changed to 33 ohm) resistors located at the source the SPI Signals.

The issue here is; in doing this, the SPI lines will always have an open circuit tail or stub trace (maybe 2-3cm) attached between from the radio to the unused controller socket. In the picture below, if the Controller-A is plugged-in and the SPI socket is not used, a short unconnected trace (stub) will exist on the board.

So the question is: will this short stub be of significant concern to SPI signalling or is it best to add selection jumpers. Is it common practice to not worry about these extra tails when they are electrically short like this? Selection jumpers add trace length and cost.

Example showing stub connection

Here is a revised sketch of the situation with a little more detail. Based on the comments received, this appears to be acceptable so long as the stubs are electrically short. It seems to me the resistors at the ends of the stubs are of no concern.

enter image description here

  • What's the SPI bus clock frequency? (please edit new info into your question, never add in comments) – TonyM Jul 07 '20 at 21:08
  • 3cm equates to 1/10th wavelength at 1GHz, so the stub will likely have little effect on anything less than 200MHz fundemental. – Tom Carpenter Jul 07 '20 at 21:21
  • Do you have any series termination on the drivers for the SPI signals? – pericynthion Jul 08 '20 at 02:23
  • "In the design, the user is only allowed to plug in one controller or the other." - of course this means some users will plug in both. A good design will tolerate that without damage, even if it doesn't work. The series termination resistors I mention in my answer will help reduce the current from bus contention in this situation, though whether they will reduce it enough to avoid damage I don't know. BTW, is the radio the bus master or the slave? – pericynthion Jul 08 '20 at 02:34

2 Answers2

2

If you have series termination resistors on the drivers for the SPI signals (i.e. CS, SCLK, MOSI on the master and MISO on the slave), which you should anyway, then in practice this will not be a problem because the resistance (in combination with the parasitic trace capacitance) will slow down the edge rate as well as performing its primary function of absorbing reflections.

For those series resistors, if you don't want to take the time to analyse the trace and cable Z0 and match it to the driving devices' output impedance, just go with 33 ohms. For SPI at 25 MHz over modest distance runs that will be fine.

If you had said 20 cm stubs it might be a different story, so good job considering it!

pericynthion
  • 6,164
  • 20
  • 34
  • Good point re: someone might plug both in ... Although I hadn't thought of that, I had mitigated the problem by placing the alternate controller SPI interface beneath the socket of controller-A so you can only plug it in if you remove the 1st controller. I updated the sketch for clarity. – Peter Laidlaw Jul 09 '20 at 17:54
1

The edge speed is what matters. Even if you have 1 nanosecond Trise and Tfall, I don't think an inch of stub will be serious, because you have 20 nanoseconds(or even 40 nS) to settle to healthy logic levels.

analogsystemsrf
  • 33,703
  • 2
  • 18
  • 46