Using SPI to drive JTAG devices ...

Hi,

I started a topic about using an Arduino to drive JTAG devices (especially for flashing EEPROMs of bricked devices like mobile phones, routers, etc ...) : http://arduino.cc/forum/index.php?&topic=74386.0

Unfortunately, I'm facing some very weird things where : - Informations about how to communicate with JTAG ports are very rares ! (please read : quite-inexistant !) - People working with JTAG devices @work must have the knowledge to help on a project like this (but, i think they must have signed some kind of secret note or something like this to not divulgate informations on it)

So, as this part of the forum is the most active, i'm trying to get some more luck here than on the "Networking, Protocols, and Devices" forum ...

By the way, thank you !

I thought the JTAG protocol itself was pretty trivial (though I didn't realize that it was SPI-compatible), but also essentially useless since few devices seem to document the format of the "commands" that you actually send. Commercial users rely on tools provided by the vendor, capable of talking through various HW implementations and finding that vendor's device somewhere in the chain that is in the product. Or something like that.

There is an "open jtag" project...

In fact, i'm, for the moment, just thinking about the compatibility of JTAG and SPI ...

They are both buses based on a CLOCK and bytes sent FULL or HALF duplex. SPI bus looks like pretty much JTAG because it has 4 pins (SPI standard) : - TDI (input data for the target/targets) - TDO (output data from the target/targets) - TCK (input clock from initiator) - TMS (mode select for the target/targets)

It can supports more pins like those : - TRST (input reset for the target/targets) // reset pin (even LOW or HIGH ; depends if pin is inverted or not) - TRTCK (returning clock from target/targets) // it can certainly be optionnal (in spite of high speed data communication) - NRST (don't know at all !) // probably a way to reset the initiator directly from the target/targets

The clock must be around 8Mhz for quite-all devices (Samsung S5P6440 CPU like in the Samsung Galaxy 3 can support higher speeds but it can apparently works on this one).

What i don't know is the full communication process with the OPCODES which are basically the COMMANDS that it is possible to send from the INITIATOR to the TARGET(S). Each OPCODE is proprietary to its component (by the way, it seems).

There is very poor documentation around this, and, moreover, constructors like samsung doesn't seems to deliver the datasheets that talks about these kind of communication process of their chips.

I even asked for it directly on their website ... for now : no answer ! =(

Hope that someone can help this little project to go further !

Thanks !

What i don't know is the full communication process with the OPCODES which are basically the COMMANDS that it is possible to send from the INITIATOR to the TARGET(S).

I think what westfw is saying is that there is no standard here, all manufacturers do their own thing.

There is an "open jtag" project...

http://www.openjtag.org/


Rob

What i don't know is the full communication process with the OPCODES which are basically the COMMANDS that it is possible to send from the INITIATOR to the TARGET(S). Each OPCODE is proprietary to its component (by the way, it seems).

yep; that matches my understanding. It looks like Atmel describes SOME of the commands possible over an AVR JTAG port (but not debugging?) If your chip vendor doesn't, you're pretty much out of luck.

(I should add: this was pretty much the state of ALL programming algorithms for all chips back in the bad old days. You got a proprietary programmer from the vendor, or from some "major device programmer vendor" that had gotten data from the manufacturer. You'd think that they would have learned...)

I have a small piece of datasheet about the Samsung S3C6410 but it only relates on the JTAG connector pinout and voltages + schematic.

http://www.megaupload.com/?d=9B39VX5V

It still doesn't contains any information about OPCODES ...