EmbeddedRelated.com
Forums

JTAG implementation using a SPI interface

Started by Christoph Schnyder October 4, 2005
Hello all

I would like to do a ICP (in-circuit programming) of a PLD which features a 
JTAG interface.
My host controller is a 16 Bit C-167 which has a SPI interface.
Instead implementing a bit-banging routine using 4 general pupose I/Os I 
prefer using the SPI interface, if possible.
Does anybody know any considerations I have to care about, or has anybody 
already experience with implementing a JTAG protocol using the mentioned 
peripheral.

Any informations or links to are greatly appreciated.
Best Regards
Chris Schnyder 


I would recommend that you start out with bit banging and then once
everything works, move on to SPI to get better performance (if you
decide you need it).  This will simplify your life greatly, and you may
find that bit banging is fast enough. A lot of chips have errata
concerning the subtleties of their SPI ports. You might not want to
deal with those issues at the start of your project.

I have been looking for a cheap and easy way for our production line to
program Xilinx PLDs without the need for a PC.  I would be interested
to see what you come up with.

I was thinking of a device that could just look at the JTAG lines of a
device that is being programmed and copy that data into a flash card.
This way you could program any device without knowing anything about
its vendor specific programming requirements. 

-howy

On Tue, 4 Oct 2005 15:07:41 +0200, "Christoph Schnyder"
<christoph.schnyder@curtis.ch> wrote:

>Hello all > >I would like to do a ICP (in-circuit programming) of a PLD which features a >JTAG interface. >My host controller is a 16 Bit C-167 which has a SPI interface. >Instead implementing a bit-banging routine using 4 general pupose I/Os I >prefer using the SPI interface, if possible. >Does anybody know any considerations I have to care about, or has anybody >already experience with implementing a JTAG protocol using the mentioned >peripheral. > >Any informations or links to are greatly appreciated.
I think it depends on how flexible the C-167's SPI interface is. If you can set it to transfer from 1 to n bits at a time, and you control the TMS line in software, you should be able to use it. If the SPI interface can only transfer a multiple of 8 bits at a time, then in general it would not be suitable for JTAG. Whether this is really woth the effort for just programming a PLD is of course debatable. Regards Anton Erasmus
On Tue, 4 Oct 2005 15:07:41 +0200, "Christoph Schnyder"
<christoph.schnyder@curtis.ch> wrote in comp.arch.embedded:

> Hello all > > I would like to do a ICP (in-circuit programming) of a PLD which features a > JTAG interface. > My host controller is a 16 Bit C-167 which has a SPI interface. > Instead implementing a bit-banging routine using 4 general pupose I/Os I > prefer using the SPI interface, if possible. > Does anybody know any considerations I have to care about, or has anybody > already experience with implementing a JTAG protocol using the mentioned > peripheral. > > Any informations or links to are greatly appreciated. > Best Regards > Chris Schnyder
We have an application where a download to the main processor is a large image that contains the executables for all the processors in the system plus all the CPLDs. We have one board where an ARM programs the CPLD and another where TI DSP's do it. I didn't write the code for either of these, but I did recently look at the code used by the TI DSP. They do use the SDI interface pins, but at the time they are set to be general purpose I/O and bit-banged. I would check to see if your C-167 has the same capabilities, most micros do, where you set some function register to determine whether each I/O pin is general purpose, or connected to some dedicated peripheral. We are using Lattice ispXPLD 5000MX CPLDs. They offer pre written drivers for programming their CPLDs for Windows, Linux, and UNIX. Each of the drivers also comes with source code, in generic C, that you can incorporate into your micro's firmware for programming in circuit. That is what one of our programmers started with to develop the actual in circuit programming. You might check with the manufacturer of your CPLD to see if they offer something similar. -- Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html comp.lang.c++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
"howy" <howard@zaxcom.com> wrote in message 
news:1128448453.206236.168320@f14g2000cwb.googlegroups.com...
>I would recommend that you start out with bit banging and then once > everything works, move on to SPI to get better performance (if you > decide you need it). This will simplify your life greatly, and you may > find that bit banging is fast enough. A lot of chips have errata > concerning the subtleties of their SPI ports. You might not want to > deal with those issues at the start of your project. > > I have been looking for a cheap and easy way for our production line to > program Xilinx PLDs without the need for a PC. I would be interested > to see what you come up with. > > I was thinking of a device that could just look at the JTAG lines of a > device that is being programmed and copy that data into a flash card. > This way you could program any device without knowing anything about > its vendor specific programming requirements. > > -howy >
What about the ftdichip FT2232C and their spi dll ? http://www.ftdichip.com/Projects/MPSSE/FTCSPI.htm http://www.ftdichip.com/FTProjects.htm would mean using a pc Someone has got it working with altera fpga's but the article is in Japanese. There is always the xilinx app notes on programming cplds from 8051's and other micros. Could always use a small fpga + systemace / compact flash. Alex
Thanks a lot to everybody.
Great !!!!

Chris Schnyder


"Christoph Schnyder" <christoph.schnyder@curtis.ch> schrieb im Newsbeitrag 
news:43427a34$1_2@news.cybercity.ch...
> Hello all > > I would like to do a ICP (in-circuit programming) of a PLD which features > a JTAG interface. > My host controller is a 16 Bit C-167 which has a SPI interface. > Instead implementing a bit-banging routine using 4 general pupose I/Os I > prefer using the SPI interface, if possible. > Does anybody know any considerations I have to care about, or has anybody > already experience with implementing a JTAG protocol using the mentioned > peripheral. > > Any informations or links to are greatly appreciated. > Best Regards > Chris Schnyder >