SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By marcusbarnet
Hi to all!
I hope you can help me..
I'd like to start programming my ARM Cortex M3 and I've bought a JTAG adapter.
I'm not able to understand how to connect the ARM to the JTAG adapter.

ARM datasheet: http://docs-europe.origin.electrocompon ... db0f69.pdf
JTAG datasheet: http://docs-europe.origin.electrocompon ... e24b5a.pdf

In the ARM datasheet there is written:
The ARM SWJ-DP Interface is embedded, and is a combined JTAG and serial wire debug
port that enables either a serial wire debug or a JTAG probe to be connected to the target.
The JTAG TMS and TCK pins are shared respectively with SWDIO and SWCLK and a
specific sequence on the TMS pin is used to switch between JTAG-DP and SW-DP.
I just have to connect TDI, TDO, TMS and TCK which are present on the JTAG adaptor to the equivalent ARM pins or I have to do some other connections?
Should I have to connect Vcc to my ARM or not?

I've tryed to search on google but I wasn't able to find any document or schematics which can help me with the connections.

Can you help me, please?
I'd like to know the correct procedure which can let me to connect my ARM with the JTAG adapter which I have.

Thanks to all.
By marcusbarnet
thanks for your advice.
I've tryed to join the group and I'm waiting for the approval by the group admin.

It is possible to find the information which I need somewhere else, too?
By marcusbarnet
Is there no guide or tutorial which explain how to connect and use ARMs processors with JTAG adapters? :(
It's very strange because I think that ARMs processors are very diffused.

I've found a schematics which is equivalent to the connections which I've described in my previous post, but I'd like to have something more detailed.

I think that a lot of guys use the development/evaluation kit, but I'd like to use directly the ARM and I have the problem on how to connect it with the JTAG emulator.

It would be great if I could find a guide or a book to study about the usage of the ARM with some sensors like temperatura, PIRs and others but I didn't found nothing.
It's very strange, for me, to be not able to find some documentation on this theme... :(
User avatar
By leon_heller
Lots of information is available from the LPC2000 group, as I said. There are also the various manufacturers' application notes and schematics.
By marcusbarnet
Yes, the admin gave me the access to the group.

I visited the "file" section and I've found some schematics, but I didn't found the information which I was looking for. May be I visited the wrong section, I don't know.
I have to visit the group with more attention, but I think I didn't found nothing about the ARM and sensors interfacing.
May be I've found a schematic for the JTAG / ARM connection, but I think mine is a little bit different..
User avatar
By leon_heller
You only need these JTAG signals - TDI, TMS, TCLK, TDO, and nRST. Just connect them to the ARM pins.

Why not buy an ARM board instead of making your own? It'll be a lot easier.
By marcusbarnet
Thanks a lot for your answer.

I decided to not buy an ARM board because I did a circuit with Arduino which let me to control few sensors and a bluetooth module and now I'd like to substitute the Arduino board with a circuit which use just the ARM.
In this way, I think I can use the ARM in order to control the previous sensors and the BT module in the same way I did with the Arduino.

I have to insert the ARM processor in my previous circuit and I can't do this if I use an ARM board. :(
By Frostmeister
I know this is an old post, but I just hashed together an adaptor for 20pin JTAG (segger J-Link) to 20pin Cortex debug connector. The adaptors you can buy are about 50 Euros / Dollars but I used a samtec header and an IDC header with 2"-3" of IDC cable, working at 5MHz on a Kinetis tower kit + CodeWarrior with USB Segger J-Link.

As Leon Heller says, it's mainly the TMS, TDO, TDI, TCK and NRST pins, but ground and supply (VTref, not +5V) connected too. Connection as below:


Pin: JTAG: Cortex:
1 VTref VTref
7 TMS NC (key pin)
9 TCK GND (Gnd detect)
10 GND Reset
11 NC +5V (optional on twr kit)
12 GND TraceClkOut
13 TDO +5V (optional on twr kit)
14 GND Td0
15 Reset GND
16 GND Td1
18 GND Td2
19 +5V GND
20 GND Td3

Wiring: (JTAG -> Cortex) X = Not connected
4,6,8,10,12,14,16,18,20->3,5,9,15,17,19(GND on both sides)
19-> 11,13 (optional. I didn't connect these as target is already powered)

I have a KiCad project of this wired up and ready to print gerbers if anyone's interested in making a home brew circuit up, wires are working for me for the time being.

Farnell part numbers for sockets:
Samtec 20pin SMT socket (non-keyed): 186-5312
IDC header 20 pin SMT - Keyed: 142-8504

Happy homebrewing :)

Edit: Here's a link to the ARM document detailing JTAG and Cortex debug pinouts: ARM Cortex debug PDF
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]