6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 3:42 pm

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: ATF1508AS and JTAG
PostPosted: Mon May 25, 2015 5:59 pm 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Mon May 25, 2015 6:53 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
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

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Tue May 26, 2015 3:32 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Tue May 26, 2015 4:04 pm 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Fri May 29, 2015 8:33 pm 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Wed Jun 03, 2015 6:18 pm 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Sat Jun 06, 2015 8:20 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
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


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Sun Jun 07, 2015 4:56 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
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.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Sun Jun 07, 2015 6:48 am 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
Hi BDD,

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

cheers

Peter


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Sun Jun 07, 2015 4:02 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
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.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Sun Jun 07, 2015 6:59 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
This one is not high-voltage programming capable as far as I know. So you won't be able to unbrick a CPLD.


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Sun Jun 07, 2015 8:39 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
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.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Mon Jun 08, 2015 6:08 am 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
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


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Mon Jun 08, 2015 5:07 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
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.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: ATF1508AS and JTAG
PostPosted: Mon Jun 08, 2015 6:43 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: