Skip to main content
Visitor II
April 8, 2023
Question

ST-Link cable length

  • April 8, 2023
  • 9 replies
  • 4189 views

Hello,

does anyone know what the maximum cable length is for the ST-Link programmer (20-pole ribbon cable)?

Maybe someone has experience with this?

Is it possible to bridge longer distances, e.g. 50 metres? (not the USB cable, but the 20-pole ribbon cable).

    This topic has been closed for replies.

    9 replies

    Super User
    April 8, 2023

    USB cable, with active extender. Ask in your local computer store.

    Moritz1Author
    Visitor II
    April 8, 2023

    Please read the question correctly.

    I specifically asked for the length of the 20 pin ribbon cable. NOT the USB cable!

    Graduate II
    April 8, 2023

    Not designed/buffered for 50m operation.​ Only a handful of pins used.

    Graduate II
    April 8, 2023

    Need to rethink approach.

    Y​ou can get Ethernet based JTAG pods, perhaps GDB Remote Server

    Super User
    April 8, 2023

    >Is it possible to bridge longer distances, e.g. 50 metres?

    yes, but only at a data rate, that makes debug useless.

    so for useful debug speed keep stlink cable 10...50cm length and make long distance other way - as recommended .

    Visitor II
    April 8, 2023

    It is easier to reach longer distance with differential pairs than using single ended signals. Physics.

    Extend the USB cable if you can, SWD is like 3 wire SPI bus, its performance will always be inferior to USB. Signal integrity for noise and bit error rate.

    Moritz1Author
    Visitor II
    April 8, 2023

    I do not need to debug over this long wire. Its just for flashing the binary. High speed is also not needed. The flashing process can take 1 minute, this would not be a problem.

    But the question is: Is it possible to slow down the ST-Link so that this will work?

    Visitor II
    April 8, 2023

    Active USB cable extender. Consult your neighbourhood computer shop.

    Super User
    April 9, 2023

    >But the question is: Is it possible to slow down the ST-Link so that this will work?

    try it. 140Kb is lowest standard speed setting. obviously nobody had the silly idea, to flash/update something in another building with a spi-like connection over the street. It could work at a very unstable and unreliable state, most time errors will stop connection after some seconds. If you insist, to have a lottery game as update process, you will have a lot of fun.

    use the internal bootloader or your own with local connection.

    i use USB-stick, software just looking for update file on new/starting device and then update itself.

    Graduate II
    April 9, 2023

    Use the bootloader and the serila connection for programming. Even slowing down SWD/JTAG may not help, as reflections can easily produce ghost edges that will get SWD/JTAG communication out of order. Otherwise series termination all signals at the source will lower reflections and additional ground line will reduce ground bounce.