[ANSWERED] Is it safe to short circuit the SWDIO and SWCLK pins to avoid switching

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ANSWERED] Is it safe to short circuit the SWDIO and SWCLK pins to avoid switching

    I'm developing an application on a very low pin count uController (LPC-810M, 8 pins). So, it's necessary to use the same pin for both GPIO and SWCLK/SWDIO.

    When debugging, there's no issue since there will be only 1 driver on the bus.

    When not debugging and the pin is outputting a GPIO signal, there's the risk of short circuiting.

    Can this be safely done?

    I saw this infocenter.arm.com/help/index.…oc.dui0499b/CHDHDGGG.html, which says there's some current limiting protection inside the uController, but says nothing about the driver.

    I already know RS-232 lets you short circuit the TX & RX pins indefinitely (I've tested this and the current is limited to 30mA). Is there such protection for the SWDIO & SWCLK on the J-Link?
  • Hi,

    When not debugging and the pin is outputting a GPIO signal, there's the risk of short circuiting.

    If you do this, your debug session will fail/crash...

    I already know RS-232 lets you short circuit the TX & RX pins indefinitely (I've tested this and the current is limited to 30mA). Is there such protection for the SWDIO & SWCLK on the J-Link?


    You can do this on your own risk, if you really want to.
    J-Link will not be damaged if this happens. If your target is damaged depends on the series resistors used to protect the target.
    On current J-Link models, there are already series resistors present on the target interface:
    SWCLK 73 Ohm
    SWDIO 110 Ohm


    Best regards
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • J-Link will not be damaged if this happens. If your target is damaged depends on the series resistors used to protect the target.
    It seems the JLink is smart enough to disable the outputs when not in use, so then usually, there should be no short circuits. The LPC810M pins can source 45mA or sink 50mA, so I'm not worried, especially since they're only ~ $1.

    Thank you Segger for designing it right and saving me from having to plug/unplug stuff for debugging ;)

    The post was edited 2 times, last by UncleJoe ().

  • Hi,

    Alright, seems I misunderstood you.
    Yes, while J-Link is not used / no debugger is connected to it from the software side, the target interface is tri-stated / disabled.


    Best regards
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • No, you didn't misunderstand. Although rare, it's quite possible I forget to reprogram the pin from GPIO to SWD in software before debugging, thus causing a short. But it's good to see 2 levels of protection.

    I'm almost certain this has happened at least once, and my J-Link still works.

    The post was edited 1 time, last by UncleJoe ().