0
\$\begingroup\$

I am designing 3 SPI slave devices that are fairly far away from the host, The SPI communicates at 50MHz (Max) at 3.3v

enter image description here

Slave 3 is an off board device where it is connected to the board by a ribbon cable. The slave devices are just straight up connected to the master exempt for slave 3 which have a tvs diode.

Does the SPI bus needs special attention? is it okay to just straight up connect them ?

\$\endgroup\$
15
  • 3
    \$\begingroup\$ You may have to run Slave 3 at a lower speed off a separate SPI bus. \$\endgroup\$
    – user16324
    Commented Dec 18, 2020 at 14:56
  • 3
    \$\begingroup\$ You will want terminations \$\endgroup\$
    – DKNguyen
    Commented Dec 18, 2020 at 14:56
  • 2
    \$\begingroup\$ Is it possible to extend LVDS and SPI to 3 meter distance - this might help you understand the problem with bidirectional SPI - if the slaves are not transmitting back then it will be a lot more reliable. \$\endgroup\$
    – Andy aka
    Commented Dec 18, 2020 at 14:57
  • \$\begingroup\$ @BrianDrummond sadly there is only 1 SPI bus, if it actually has a problem running at that speed, i will just have to keep switching the SPI clock when trying to communicate with slave 3. \$\endgroup\$
    – Jake quin
    Commented Dec 18, 2020 at 15:34
  • 2
    \$\begingroup\$ One thing you can do to help the termination nightmare is to route that net as a single line rather than a trident with three different length stubs, even if that line is a little longer. (Then you might find a series termination RIGHT at the send end of each line is enough). But I doubt that's good enough for 50MHz. \$\endgroup\$
    – user16324
    Commented Dec 18, 2020 at 15:59

1 Answer 1

1
\$\begingroup\$

In my case a SPI connection (initially separate loose wires) did not work reliably until I noticed that the clock lead really "likes to be" near the ground lead - suddenly starts working much better. But it was a slightly larger distance, about 30 cm wires between the two separate PCBs.

In response, I have used the ribbon cable with every second wire grounded, and all four SPI signals in between. The connectivity is now reliable. Maybe I have over tried with the measure so draconian but at least one less thing to worry about in my design.

\$\endgroup\$
2
  • \$\begingroup\$ At what speed? for comparison with the question's 50MHz. \$\endgroup\$
    – user16324
    Commented Dec 19, 2020 at 0:48
  • \$\begingroup\$ The speed was irregular in my case, because I was driving all signals directly from C++ on Linux through GPIO in userspace. The tlc5947 chip is kind of SPI but not completely. See electronics.stackexchange.com/questions/520886/… on that project. \$\endgroup\$
    – h22
    Commented Dec 21, 2020 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.