Site description

A blog for electronics professionals, amateurs, hackers, and anyone interested in the world of electronics.

14 October 2010

JTAG is JTAG right?

Well no, of course not, or I wouldn't be writing this...

A little background: JTAG (Joint Test Action Group) was a standard set up to perform something called Boundary Scan on circuit boards. Briefly, this tests the wiring between ICs to ensure continuity and a lack of short circuits. Effectively it disconnects the real contents of the chip and connects I/O registers to the chip pins. The test system can then program these appropriately and read out the levels on each pin. However, it rapidly advanced to much more than that, and has become a standard way to program and interrogate embedded micros whilst they are in-system. It really allows you to get "inside" the workings. Most 32-bit micros support JTAG although, typically, each micro family has slightly different connections and connector pinouts.

Like many developers - both amateur and professional - I have used a classic JTAG "wiggler" clone which sits on a PC parallel port and bit-bangs the data s-l-o-w-l-y into your target micro / board. I even keep an old Compaq SFF PC for the job, because my super whizzy dev machine doesn't have a conventional parallel port. In any case - if it ain't broke why fix it?

Well, in my case it is, kinda. It has certainly seen better days, and is becoming unreliable. I also needed to hack together a new lead for the Cortex M3 micro I am using in Prospero, so I had a look around to see what was what in the wiggler market place, and not much seemed to have happened. The thing was, though, I was using far too narrow search terms, and it was inherently pulling back links to old technology. On a whim, I decided to see how much USB wigglers were going for and - hey presto - back came a load of new links. It seems that in the few years since I got my wiggler, things have moved on somewhat. Yeah I really should have read the magazine articles about the latest whizzbang JTAG programmers from whoever, but life's too short to read everything!

The USB Wiggler!

There are various technologies out there, most of them closed and tied up in legal restrictions. Not very 2010, and very expensive. However, quite a few seem to be based on the excellent FTDI FT2232 dual USB-to-serial port chip. The 'A' port can be configured to be driven in a custom mode which is ideal for JTAG control. Not only that, but it leaves available the 'B' port, which I could use as an In-System Programming (ISP) port. Ideal!

The standard FT2232D is a standard USB chip, but in the past year or so, FTDI have announced the 'H' variant which works at USB 2 speeds. Even better, but a bit of an unproven quantity in this context.
Nevertheless, that is what I am going with. In the first instance I am going to use one of FTDI's development modules, this stops me having to mess around with lots of support components, leaving just some voltage translator / buffers and drivers for the compulsory flashing lights. They can actually be good for diagnostics, but most of us engineers are just big kids at heart and we love flashing lights.

More on this to follow soon(ish)!

No comments:

Post a Comment