2
\$\begingroup\$

I'm developing for a very limited, 8 pin LPC810 microcontroller and have to connect multiple signals on a single pin. Obviously, if there's only 1 output signal on a bus, that should be OK, but what about 2 output signals? I have 3 such cases (1st signal listed is only used in programming/debug mode, while 2nd is only used during run time):

  1. RS-232 TX output and push button - these are OK because I've read that RS-232 can be "short circuited" indefinitely by limiting the current (I measured ~30mA)

  2. SWDIO/SWCLK (ARM serial wire debug) and GPIO output - this is my main inquiry. I know GPIO cannot be safely shorted, so for this to work, SWDIO & SWCLK must be current limited. Is that the case? I don't want to risk breaking my Segger JLink to find out.

  3. push button (for enabling programming mode) and GPIO output - if these were to compete, the GPIO would definitely die. But I did find a way to put them on a bus without killing the GPIO: press and hold another reset button, which makes the GPIO output a GPIO input, and then press the button. This is kind of cumbersome - is there a better way?

Note: please ignore the correctness of 2 short circuited signals - I'm assuming only the cases where 1 signal dominates the other are actual use cases.

Update Here's a diagram:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ You can't switch them to OD? \$\endgroup\$ – Ignacio Vazquez-Abrams Jun 2 '14 at 0:43
  • \$\begingroup\$ Maybe if I could change the firmware, but in general it's harder than just letting them short. The RS-232 TX is always high even when I'm not using the COM port. I don't know about SWDIO and SWCLK when it's not used (hopefully Segger did the smart thing) \$\endgroup\$ – Yale Zhang Jun 2 '14 at 1:02
  • \$\begingroup\$ Could you include a schematic of what you are trying to do? \$\endgroup\$ – tcrosley Jun 2 '14 at 1:15
  • \$\begingroup\$ I2c and other protocols basically do this using pull-up resistors and high-z inputs. Two devices can assert the same line without shorting. \$\endgroup\$ – Ryan Griggs Jun 2 '14 at 2:51
  • \$\begingroup\$ My personal solution to this issue is to move to the LPC812 in an SOIC20 package. \$\endgroup\$ – starblue Jun 2 '14 at 19:25
1
\$\begingroup\$

I'm having a hard time understanding what you're trying to do, but as long as you think about all the various states the components could be in and put the appropriate current limiting resistors on, I don't see why not. Beware that inline resistors can mess with high speed communication, I don't know how fast your RS-232 is running.

\$\endgroup\$
0
\$\begingroup\$

OK, thanks very much to Alex from Segger for answering here

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

I doesn't seem likely ARM would insist on having protection in the spec. So whether SWDIO and SWCLK can be shorted depends on the driver, but as long as the debugger was designed by competent professionals, it ought to be protected.

\$\endgroup\$
0
\$\begingroup\$

I'm not quite sure that I understand your complete situation, but if you you are trying to drive a single line with two outputs, this is like diode logic.

For example:

  1. Diode#1 Anode to uC Pin1 and Diode#1 Cathode to output line
  2. Diode#2 Anode to uC Pin2 and Diode#2 Cathode to output line

This will isolate Pin1 and Pin2, while allowing both to interact with the output line.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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