Skip to main content
ISeed
Associate III
Apr 5, 2019 7:59 AM UTC
Question

Best way to transfer fast data over 1 meter cable

Hello, all!

A quick question: if I want to transfer data between 2 STM32 devices, which are located 1 meter apart, at a rate of at least 20Mb/s, in bursts of 300KB at a time. what is the best way to do so?

The communication is unidirectional.

I suppose my options are either :

  • SPI (which I'm not sure about, because I understand it's only good for up to ~30 cm)
  • 8 parallel data lines with a clock, which allow me to effectively cut the bit rate by 8, but I don't know if it will actually be reliable and if suitable cables with enough wires are available for purchase.
  • Some other possibility I'm not thinking about?

Thanks!

    This topic has been closed for replies.

    16 replies

    AvaTar
    Senior III
    Apr 5, 2019 8:24 AM UTC

    > I suppose my options are either :

    • SPI (which I'm not sure about, because I understand it's only good for up to ~30 cm)

    With proper drivers (I mean hardware) and homogenous, impedance-matching cables, this works.

    I had been on a project that successfully used SPI over ethernet patch cable as means of communications.

    A higher level protocol to detect and correct transmission corruptions is advised, though.

    ISeed
    ISeedAuthor
    Associate III
    Apr 5, 2019 8:49 AM UTC

    Thanks! These drivers, are they independent HW components I can look for, at, let's say, DigiKey? How are they called?

    Do some STMs happen to have those on board?

    AvaTar
    Senior III
    Apr 5, 2019 9:27 AM UTC

    > These drivers, are they independent HW components I can look for, at, let's say, DigiKey?

    Yes, so much I remember. But not a specific name, it was more then 6 years ago.

    In general bus drivers with an output impedance matching that of your cable. Ethernet cable and RJ45 connectors are a relatively cheap solution.

    Perhaps differential drivers for RS485, CAN, or similar. The transceiver chips are usual not specific for said protocols, only the bus levels. Bandwidth should be sufficient, I would say about 100MHz for a digital 20MHz signal.

    Or asymmetric one's, like 74 series bus transceivers.

    After Forever
    Senior III
    Apr 5, 2019 8:26 AM UTC
    ISeed
    ISeedAuthor
    Associate III
    Apr 5, 2019 8:47 AM UTC

    Thanks! reading now

    Tesla DeLorean
    Guru
    Apr 5, 2019 9:18 AM UTC

    Ethernet

    One could likely fake a version without magnetics for point to point.​

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    S.Ma
    Principal
    Apr 5, 2019 9:29 AM UTC

    Ethernet is good.

    Backup would be monodir link

    Check on DS90LV031A cmos to lvds to cmos

    Uwe Bonnes
    Chief
    Apr 5, 2019 9:48 AM UTC

    20MB/s and 100 Mb Ethernet does not fit together. 20 MB/s is > 160 Mb/s.

    Does the llink need to be bi-directional? Does the link need to be flexible with a cable or can it be a backplane. Maybe some serdes chip connected to the FMC can do the job.

    Otherwise STM32MP1 has Gigabit Ethernet.

    AvaTar
    Senior III
    Apr 5, 2019 9:52 AM UTC

    I think this is an ambiguity in the OP.

    SPI would not be able to manage 20MByte/s, neither would the receiver really be able to sustain this data rate for sensible package sizes.

    I suppose he meant 20MBit/s.

    Dvorak.Peter
    Associate II
    Apr 5, 2019 3:57 PM UTC

    My 2 questions are:

    Is power and ground common to both devices.

    Is this link ever unplugged

    ISeed
    ISeedAuthor
    Associate III
    Apr 5, 2019 7:07 PM UTC

    Yes, the ground is common.

    They work only with each other, connected via a connector that I'll add, depending on the chosen protocol.

    Dvorak.Peter
    Associate II
    Apr 6, 2019 12:31 AM UTC

    I would use :

    SPI

    Ethernet 1m CAT5 patch cable

    RJ45 connectors

    RS422 tx rx chips or RS485 transceivers

    100 ohm termination on each pair

    Make sure that on the receiving side you sample in the middle of the data cycle.

    TI SN65HVD7x 3.3-V Supply RS-485 With IEC ESD protection is rated up to 50Mb/s

    http://www.ti.com/lit/an/slla173a/slla173a.pdf

    S.Ma
    Principal
    Apr 6, 2019 5:26 AM UTC

    Both the transeiver which diff the signal and the peripheral in the MCU must sustain the speed.

    Otherwise, multiply the peripherals on each side to widen the bus...