Re-programming Secure Microchip ATF150x series CPLD devices - Page 1
Forum section: electronics / general

author: deanclaxton
author_rank: Regular Contributor
timestamp: November 06, 2024, 02:02:37 am
content: I thought I'd best start a new thread for the Microchip parts versus the discussion herehttps://www.eevblog.com/forum/fpga/programming-(non-jtag)-max7000-devicesabout the MAX7000 devices.What I'm wanting to be able to do is set the security fuse on Microchip ATF150x series parts, and then be able to erase and reprogram them using a JTAG programmer.For JTAG programming I have been using the Microchip ATDH1150USB, and that works great for programming the parts in system. On designs where I've used some or all of the JTAG pins for general I/O, I've been careful to lay the board out in such a way that I can safely apply +12V to the OE1 pin - this allows the JTAG interface to be re-enabled for re-programming.What I've not been able to do though is secure the design via the security fuse. Or at least I've not been able to reprogram a chip afterwards using the ATDH1150USB programmer. Even with +12V applied to OE1.Thus I'm trying to work out the secret to this. Using my Xeltek 6100N with TQFP44 adapter I can secure a chip, and erase it, and reprogram it and re-secure over and over. But thats not a practical solution when the chip is soldered to a board. I'm also very curious as to how it does this and will have to put the logic analyser on it no doubt.I noted that Xeltek do a dedicated ISP programmer (the IS01), so I sent them a support email to query whether this is possible using the IS01. I havent got to the bottom of that yet (they didn't answer that particular question) however they did send me information on the connections required for JTAG progamming ATF150x (attached as I'm unsure how to attach images inline).I note that they do indeed include the OE1 pin (Vpp) on their header so I'm hopeful that this programmer might be able to do it. I've asked again the specific question as to whether it can reprogram a secured device so I'll see what they say. Its not a cheap programmer, but if it can do it then I may just have to get one. I'll report back my findings.EDIT : For projects where the JTAG interface is dedicated (not used for general I/O) you can happily secure the device and reprogram over and over with the ATDT1150USB without the need for voltage on OE1 at all. The issue is when the JTAG has been reused for IO, and security enabled.

author: coromonadalix
author_rank: Super Contributor
timestamp: November 06, 2024, 03:16:13 am
content: you hadhttps://www.kanda.com/CPLD-Programmers.175.htmlhttps://www.kanda.com/dload/soft/130815-v7.2.2-ATDH1150USB_CD.zipwho dealt with theses ... seems obsoletes, you have some docs in the downloaded file, the programmer was based on ftdi chip inside "2232" i think, maybe the notes can helpi dont have any schematics for now, but we could program on board with no problems with the kanda interface .. mostly played with the atf1504 modelbut as for security, we never locked it, if it's possible ...the pinout seems right, do you need a target vcc sense on the Xeltec ? i had one on the Elnec i had ??

author: deanclaxton
author_rank: Regular Contributor
timestamp: November 06, 2024, 03:56:10 am
content: To clarify, it is the ATDH1150USB-K that I have, which is still actively sold by Kanda, Mouser, etc.You can set the security bit no problem with this programmer, but once set I've been unable to re-program the device. I'm hoping that it is possible with another JTAG programmer like the Xeltek ISP01.If I de-solder the chip and drop it in my Xeltek 6100N I can reprogram it. So clearly the 6100N is doing something different to allow the device to be erased after security has been set. And perhaps its just something tricky with the OE1 pin (Vpp). I need to hook up a logic analyser to the 6100N but I'll see what Xeltek say about the capabilities of their IS01 programmer and whether it can re-program a device once security is set. If so then it's got to be the way the OE1 pin is driven that is key to it?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 06, 2024, 08:55:55 am
content: It’s been a while, but iirc the ATF15x used a svf playback, that it made from the Jed.Did you check that has an erase command inserted ?

author: deanclaxton
author_rank: Regular Contributor
timestamp: November 06, 2024, 09:18:28 am
content: To be honest I'm unsure of the mechanics - I just use the Atmel ISP utility and load the JED and set it to program and verify. If I'm erasing the device first I just use erase, blankcheck, and then program/verify as a separate command.If security is set, erase does not work - nothing seems to work. But I will experiment some more with this. I'm waiting for a response from Xeltek about the IS01 capabilities.

author: asmi
author_rank: Super Contributor
timestamp: November 06, 2024, 02:40:39 pm
content: I wonder why do you need to set this security bit at all?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 06, 2024, 06:59:28 pm
content: Quote from: deanclaxton on November 06, 2024, 09:18:28 amI found this :https://www.hackup.net/2020/01/erasing-and-programming-the-atf1504-cpld/He says thisSo I added a 12V power supply to the breadboard contraption and created another SVF file to erase the CPLD, again using ATMISP. And indeed, with 12V on OE1 I was able to erase the used ATF1504!

author: deanclaxton
author_rank: Regular Contributor
timestamp: November 06, 2024, 10:29:10 pm
content: Yeah thats the trick I have been using to reprogram chips where the the JTAG is locked out or used for another purpose and that works well.It doesn't work however if the device is secured (security=on). At least that is my findings to date. Maybe though its just the software? I don't know, but I've been unable to reprogram a chip that had been secured using this +12V OE1 trick. EDIT : I've also been unable to erase one.I'm now keen to see if there is anyone else who has some sort of ATF150x board that they could secure and attempt to reprogram using the Microchip tools or other tools.I just heard back from Xeltek and they told me that "Yes, our programmers can erase secured chips to be reprogrammed." so that is good news.They've asked me to share part of my schematic so I'll go through the process with them and find out for sure whether the Xeltek IS01 will do what I want to do.If it can, then it must be either the software, or how Vpp is applied (pulsed? ramped? etc).

author: deanclaxton
author_rank: Regular Contributor
timestamp: November 06, 2024, 10:32:08 pm
content: Quote from: asmi on November 06, 2024, 02:40:39 pmYou dont need to, and I haven't been to date due to the reprogramming issue, but for an upcoming design I'd like to slow down the people out there that will happily clone the design and undercut me on price.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 06, 2024, 11:06:39 pm
content: Quote from: deanclaxton on November 06, 2024, 10:29:10 pmYou could try what they do in that link I gave ?They have an erase SVF file, created by Atmel tools, that they use OpenOCD to playback on a FT232HQ.ie Connect that to a chip in a ZIF first, to confirm you can manage the elusive erase step ?

author: deanclaxton
author_rank: Regular Contributor
timestamp: November 07, 2024, 01:49:37 am
content: Interesting - yes I'll give it a go. I think I have a generic FT232HQ board somewhere, but I wonder if OpenOCD would work with the ATDH1150USB.EDIT: Unofficial schematic for ATDH1150USB here :https://github.com/programmable-logic-tools/atmel-atdh1150usb- appears to use the FT2232.OpenOCD supports the FT2232 so it should be a matter of creating a suitable config file for the ATDT1150USB I'd think.

author: caius
author_rank: Regular Contributor
timestamp: November 08, 2024, 04:56:24 pm
content: I always program ATF15xx CPLDs with a simple homemade parallel programmer (2-3 euro of cost...), a PC with Windows XP and ATMISP version 6.7.Instructions here :https://github.com/MattisLind/82S100replacement

author: deanclaxton
author_rank: Regular Contributor
timestamp: December 05, 2024, 11:11:23 pm
content: On a couple of my projects, the JTAG pins are dedicated to JTAG (not used for general IO), and on these projects I have found that I can happily use the ATDH1150USB to program/verify/SECURE the device, and reprogram it over and over without having to apply any voltage to the OE1 pin.