6502.org
http://forum.6502.org/

ATF1508AS and JTAG
http://forum.6502.org/viewtopic.php?f=10&t=3304
Page 1 of 2

Author:  Druzyek [ Mon May 25, 2015 5:59 pm ]
Post subject:  ATF1508AS and JTAG

I'm trying to get an ATF1508AS running and soldered up a microcontroller to program it over JTAG. I got it into BYPASS mode so that it would echo back whatever I send to it after looking at this site: http://www.fpga4fun.com/JTAG3.html.

I used WinCUPL to write a test file and converted it to an SVF with ATMISP. The first SIR instruction in the file is:
Code:
SIR 10 TDI (280);
SDR 10 TDI (1b9);

I'm not sure what this does but the next one is:
Code:
SIR 10 TDI (059);
SDR 32 TDI (ffffffff)
   TDO (0150803f)
   MASK (ffffffff);

The BSDL file lists 059 as the IDCODE instruction and 0150803F or 0150903F as expected responses. However, when I try it, it just returns all 0s, whether I try the SIR 10 TDI (280); instruction first or not.

Any idea what could be going on? I have never worked with JTAG before. Could this be something chip related?

Author:  Dr Jefyll [ Mon May 25, 2015 6:53 pm ]
Post subject:  Re: ATF1508AS and JTAG

I'm attaching the datasheet for reference -- there's a lot of detailed information there, much more than I can study right now.

For debug purposes, the "Boundary Scan" may be a more basic test for you. I've used this on Cypress devices, and I expect the Atmel function is similar. Boundary Scan operates using the JTAG link but its purpose is to directly read & write the values of individual pins. IOW it's not about programming logic equations into the device -- the device internals are bypassed.

What I'm suggesting is this. If you're unable to program the internals of the device, you could try using Boundary Scan to manipulate the device pins directly. If that is successful then at least you know your JTAG link is functional. Unfortunately the Boundary Scan details are not entirely simple, so my suggestion doesn't offer an easy answer. But if you wanted to learn about Boundary Scan anyway then here's a chance to put that knowledge to use.

cheers,
Jeff

Attachments:
ATF1508AS.pdf [690.1 KiB]
Downloaded 227 times

Author:  cbscpe [ Tue May 26, 2015 3:32 pm ]
Post subject:  Re: ATF1508AS and JTAG

What download cable do you use and what software to download the SVF file? Did you check power-supply and the VCC connection from the target to the download cable? Does the download cable provide pull-ups and if not do you have installed pull-ups?

Author:  Druzyek [ Tue May 26, 2015 4:04 pm ]
Post subject:  Re: ATF1508AS and JTAG

Thanks for the suggestion, Dr Jefyll. I think it was a software bug because I can at least read the device ID now. One thing I found out is that when you are reading registers, the output is available before the clock rises, rather than after the down stroke of the first pulse like you might think from the datasheets.

cbscpe, I'm not using a download cable or software. I'm programming the chip myself with a microcontroller.

Author:  Druzyek [ Fri May 29, 2015 8:33 pm ]
Post subject:  Re: ATF1508AS and JTAG

So I got everything working well enough to read the IDCODE correctly but I can't get it to program. The SVF file has a couple hundred SDI TDI 326 instructions then another couple hundred that also have TDO expectations. The very first one reads back an incorrect TDO character on the second byte.

Some of the app notes mention using the Atmel SVF2PCF utility to generate PCF files, which should be much easier to program. Where can I download this? I can't find it anywhere. There is also no Atmel forum for CPLDs. So far Atmel is getting a bad grade for support :/

EDIT: The first character is the same by coincidence. The four characters of the IDCODE are read out and the following bytes appear to be what is expected. Anyone have an idea?

Author:  Druzyek [ Wed Jun 03, 2015 6:18 pm ]
Post subject:  Re: ATF1508AS and JTAG

I couldn't get JTAG to work so I generated PCF files which show the state of the JTAG pins every clock cycle and was able to program the chip successfully. Unfortunately, the utility for this is 16-bit and had to be run in a Virtual Machine, which is a real pain. I tried Altera's version of the program and the files it generated did not have any wait states, which the previous files inserted after every line of data was programmed in. When I tried to program that, the CPLD returned bad values and has since stopped functioning at all. I can't even read the IDCODE any more with known working code from before.

Anyone know how to unbrick an ATF1508? The datasheet mentions "third-party programmers" that don't require JTAG.

Author:  cbscpe [ Sat Jun 06, 2015 8:20 pm ]
Post subject:  Re: ATF1508AS and JTAG

Quote:
Anyone know how to unbrick an ATF1508? The datasheet mentions "third-party programmers" that don't require JTAG.

it's as the documents says, you need a programmer that is capable of the high-voltage programming procedure for ATF15xx devices. As there is almost no free information about HPV for ATF15xx you really need a certified programmer to unbrick a ATF15xx. The same is true if you want to use TDI, TDO, TCK and TMS as normal IO pins. There is a document on ATMELs home-page (very outdated) that lists a number of programmers supporting the ATF15xx devices, they are all expensive (>500USD). I'd say you just buy new ATF15xx instead. That's what I do. And before bricking others I would recommend to by a ISP programmer like the ATDH1150USB (60USD) which is supported and known to work. Although it still cannot unbrick any devices as it only supports ISP and no HVP.

cheers

Peter

Author:  BigDumbDinosaur [ Sun Jun 07, 2015 4:56 am ]
Post subject:  Re: ATF1508AS and JTAG

Druzyek wrote:
Anyone know how to unbrick an ATF1508? The datasheet mentions "third-party programmers" that don't require JTAG.

Is it a PLCC-84 package? If so, I can probably revive it, as I have the Atmel programming rig, complete with the PLCC-84 adapter.

Author:  cbscpe [ Sun Jun 07, 2015 6:48 am ]
Post subject:  Re: ATF1508AS and JTAG

Hi BDD,

what ATMEL programming rig do you have? I'm only aware of this one ATF15XX-DK3.

cheers

Peter

Author:  BigDumbDinosaur [ Sun Jun 07, 2015 4:02 pm ]
Post subject:  Re: ATF1508AS and JTAG

cbscpe wrote:
Hi BDD,

what ATMEL programming rig do you have? I'm only aware of this one ATF15XX-DK3.

cheers

Peter

That's the one. I mentioned it in this post.

Author:  cbscpe [ Sun Jun 07, 2015 6:59 pm ]
Post subject:  Re: ATF1508AS and JTAG

This one is not high-voltage programming capable as far as I know. So you won't be able to unbrick a CPLD.

Author:  BigDumbDinosaur [ Sun Jun 07, 2015 8:39 pm ]
Post subject:  Re: ATF1508AS and JTAG

cbscpe wrote:
This one is not high-voltage programming capable as far as I know. So you won't be able to unbrick a CPLD.

It is able to program a device in which the JTAG pins are defined as inputs and/or outputs. Such a device can't be programmed in-circuit via JTAG alone, so there must be something different about it.

Author:  cbscpe [ Mon Jun 08, 2015 6:08 am ]
Post subject:  Re: ATF1508AS and JTAG

Hi BDD,

now you made me curious. Do you mean you can program and re-programm a ATF15xx with a design that uses the ISP pins as normal IO pins with your programmer? I always thought that once you load a design which uses the ISP pins you no longer can use ISP and need a different programming algorithm and using high-voltage programming.

cheers
Peter

Author:  BigDumbDinosaur [ Mon Jun 08, 2015 5:07 pm ]
Post subject:  Re: ATF1508AS and JTAG

cbscpe wrote:
Hi BDD,

now you made me curious. Do you mean you can program and re-programm a ATF15xx with a design that uses the ISP pins as normal IO pins with your programmer? I always thought that once you load a design which uses the ISP pins you no longer can use ISP and need a different programming algorithm and using high-voltage programming.

cheers
Peter

I'm going by what the Atmel documentation indicates. I have yet to try it though.

Author:  cbscpe [ Mon Jun 08, 2015 6:43 pm ]
Post subject:  Re: ATF1508AS and JTAG

Hi BDD,

I've read the document for this development kit and in no place it says that you can use the JTAG pins as normal IO pins. Also on the kit the JTAG pins are only connected to the JTAG connector (when you look at the schematic of the kit and the adapters). And in fact the whole programming takes place only via the download cable. The kit does not add any functionality it just provides power.

It is indeed possible to download a design that makes use of the JTAG pins as normal IO pins. And that's it, as soon the download is finished the pins will turn into normal IO pins and never again will be usable as ISP JTAG pins, unless you have a programmer with the high-voltage programming algorithm as I suspect.

So when you try it, be prepared that you may no longer change the design of this CPLD. If you are willing to try it, I would really be interested in the result.

Cheers

Peter

Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/