Hi Benjamin,
On 2011.06.11 18:47, Benjamin Henrion wrote:
I own a JTAGkey Tiny, I am interested to test flashing an SPI BIOS chip with it, what should I do?
The webpage says:
"The Amontec JTAGkey2 can be used with flashrom for programming SPI chips. JTAGkey and JTAGkey-Tiny should work, if you add them to ft2232_spi.c (untested)."
The first thing to do will be to find the USB Vendor ID (VID) and Product ID (PID) of your device. This can usually be accomplished by plugging in your device and checking its properties (eg. by issuing the command 'lsusb' on Linux). The VID used by Amontec is expected to be the same as the one used by FTDI, hence 0x0403, so all you should have to do is find the PID.
Once you have these values, you should be able to duplicate the entries related to the JTAGKey in ft2232_spi.c, and add a new identifier for yours. Then after recompiling (you'll need libftdi installed), you should be good to go.
Should I power the chip externally in 3.3v?
Yes you should. Both the Amontec and the Olimex based products related to ARM JTAG interfacing use a standard ARM JTAG pinout, that does not include provision for providing power.
An example of the full ARM JTAG pinout is provided in the entry for the ARM-USB-TINY [1]. VREF and VTARGET are used as input only (and are usually connected together), to adjust to the voltage being used by the target device, so unless your device has an additional port to provide power, the JTAG port alone will not do as a voltage source.
However, I found that providing power for SPI was really no trouble at all: all you need to do is pick up a couple of AA or AAA batteries, put them in serial, and you have the 3.0V DC you are after (anything close to 3V will do - it doesn't have to be exactly 3.3). If you have any remote lying around, that uses 2 AAs, all you have to do is open the battery compartment and stick 2 cables where the batteries make contact near the middle, since all the remotes I know have the battery serialization at the bottom.
The voltage source then needs to be split between the JTAGKey (JTAG VREF+GND) and your SPI target (SPI VCC+GND), but if the JTAGKey Tiny design is the same as the ARM-USB-TINY from Olimex, even that should be a no brainer, as VREF and VTARGET would be connected together, as well as all the ground lines. Therefore, you just have to connect the voltage source to the key, and you should be able to pull that voltage, from duplicated pins, into your SPI port.
Please let us know how your testing goes.
Regards,
/Pete
[1] http://www.flashrom.org/FT2232SPI_Programmer#Olimex_ARM-USB-TINY_and_related...