Configuring an XC3S400 Spartan 3 with JTAG

Hello, I want to configure a Spartan 3 with an ARM controller comporting several GPIO pins (0-3,3v), from which I use 4 to drive the JTAG controller of the FPGA. I tried a basic configuration which only reads the IDCODE of the device, but the value seen on TDO is not what is excepted, altough a green led indicating that the device is properly configured becomes active. Moreover, I tried to configure the device with xsvf and it stops rapidly with an error, because the TDO value mismatch. Has anyone experienced these problems? Do we have to take care of other things? NOTE: to configure the device with JTAG, I reproduced the state machine driven by TMS and TCK I checked at the oscilloscope that the sequencing was correct with respect to the state machine, the only problem is the mismatch on TDO. For the IDCODE = 01001, I ran first in SHIFT-IR state and produced 1, 0, 0, 1, 0 on the TDI line After that I ran in SHIFT-DR state, and clock TCK 32 times, reading TDO at each edge

Thank you very much for your help, if anyone has a working detailed example about this JTAG programming

Reply to
jeycrisis
Loading thread data ...

A piece of advice, use SPI interface (if you have one in your ARM micro) and slave serial programming (PROG, DI, CCLK,DONE) it's far more simplier not to mention that software is trivial (just open the bitstream anf fire to the SPI byte by byte, you don't even need to strip the header of the file, it will self synchronize) if you are using this interface (jtag) for anything else than programming the fpga then discard my post.

Aurash

jeycrisis wrote:

--
 __
/ /\/\ Aurelian Lazarut
 Click to see the full signature
Reply to
Aurelian Lazarut

Thank you for your advice. In fact, I just have to program the FPGA. I have no SPI to do it, just GPIO pins. On the FPGA board, I have access to PROG_B, DIN, CCLK, DONE, INIT_B and the JTAG pins. How would you program it using the slave serial configuration mode? What file you send on the FPGA, the .bit file or another? Which bit you send first? Are there any potential problems due to the 3,3V voltage I have on the GPIO pins or is it fine? (Spartan-3) Thank you for your help

Reply to
jeycrisis

GPIO will do as well, use a bit for generating the CCLK and one bit to shift out the data, one byte at a time, msb first. before you start you toggle PROG_B to erase the configuration. (toggle low then high)

*.bit

msb

Add a 100 ohm in series with CCLK and D0 assuming 3.3V on your gpio pins.

After you shift out all the *.bit content issue some extra CCLK periods ( ~20 ) to make sure that the part is starting. and be careful to generate the bitstream with cclk as a startup clock (not jtag) from ISE bitgen options

Have fun, Aurash

--
 __
/ /\/\ Aurelian Lazarut
 Click to see the full signature
Reply to
Aurelian Lazarut

Thank you again, I thing I will try this option... Do I have to change something on MO, M1, M2, because on the board I am using there is no way to access these pins.

Reply to
jeycrisis

yes you have to pull them low/high according with the datasheet (most of the boards they have jumpers) Aurash

--
 __
/ /\/\ Aurelian Lazarut
 Click to see the full signature
Reply to
Aurelian Lazarut

Must be verified, but almost all parts have internal pull-up on M0 M1 M2 ! Just a jumper (or pull-down popullated or not) is required .

Larry,

formatting link

Reply to
Laurent Gauch

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.