December 31, 2020

Segger J-link Connector

One end of the Segger has one of the old burly square USB connectors. The other end has a 20 pin male IDC that connects to the usual ribbon cable. What I want to know is what signals are on this connector and how I can safely connect it to whatever boards I want to use it with.

Here is what we are dealing with:

Looking inside my unit, I see even pins 4-20 indeed connected to ground.

Pin 2 goes to a jumper (which is in place). With the jumper in, this gets a 3.3 volt supply, with it out, it is isolated. I am pulling this jumper and leaving it out so this is a N/C pin as per the Segger document.

Checking with a meter, all the odd pins measure 0 volts.
Pins 3-17 all connect to the 245 chips via 22 ohm resistors. These are signals.

Pin 1 is called "VTref" and should be connected to the power rail on the target system. The Segger uses this to sense the levels on the target system and to configure itself.

pin 19 goes to what looks like a transistor. There is 5 volts on another terminal of the transistor, so as the document says, this "may" be used to provide 5 volts to the target.

Connecting for SWD

This fellow makes some connections that would not work with my particular unit. He expects to get 3.3 volts from the VTref pin. Now I could provide 3.3 volts via my pin 2, if I left the jumper in. Ignoring power and ground, he makes 3 other connections as follows:
Segger pin 7 (TMS)   -- SWDIO
Segger pin 9 (TCK)   -- SWCLK
Segger pin 15 (RESET) -- RESET
My devices with SWD don't include reset, but it would be handy to have it. If you have access to your reset pin, you can just connect it to pin 15.

Connecting other devices

It is all about sorting out power, ground, and logic levels. This article is informative. What they state is that the Segger can either provide 5 volts or not (which makes sense give the transistor controlling whether 5 volts goes to pin 19 or not. You either get it or you don't.

What this guy does is to get rid of the transistor controlling the 5 volts (since as he says, these days over 99 percent of projects are using 3.3 volts) and adds a jumper wire to carry 3.3 volts to pin 19 all the time instead. He also makes a permanent connection from pin 19 to pin 2. Then he can install a jumper to tell pin 1 (VTref) that he is running on 3.3 volts.

What I could do, inspired by him, is to remove the transistor and then just connect pin 19 to pin 2 (since I can put 3.3 volts there on my board already via the jumper I mention above. Then I install his jumper from 1-2 to tell VTref what I am doing and let pin 19 supply my target.

I'll note that on my Segger, an AMS1117 device is the 3.3 volt regulator. He suggests this can supply up to 800 mA, which may be true for the device, but he is forgetting the 500 mA USB power limit. Also the Segger itself does use some current, so we will be able to get maybe 400 mA as my guess.


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org