Author Topic: Re-programming Secure Microchip ATF150x series CPLD devices  (Read 4589 times)

0 Members and 1 Guest are viewing this topic.

Offline deanclaxtonTopic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: au
Re-programming Secure Microchip ATF150x series CPLD devices
« on: November 06, 2024, 02:02:37 am »
I thought I'd best start a new thread for the Microchip parts versus the discussion here https://www.eevblog.com/forum/fpga/programming-(non-jtag)-max7000-devices about 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.
« Last Edit: December 05, 2024, 11:24:38 pm by deanclaxton »
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 7125
  • Country: ca
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #1 on: November 06, 2024, 03:16:13 am »
you had

https://www.kanda.com/CPLD-Programmers.175.html
https://www.kanda.com/dload/soft/130815-v7.2.2-ATDH1150USB_CD.zip

who 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 help

i dont have any schematics for now,  but we could program on board with no problems with the kanda interface  .. mostly  played with the atf1504 model

but 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 ??
 

Offline deanclaxtonTopic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: au
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #2 on: November 06, 2024, 03:56:10 am »
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?

 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2139
  • Country: au
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #3 on: November 06, 2024, 08:55:55 am »
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 ?
 

Offline deanclaxtonTopic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: au
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #4 on: November 06, 2024, 09:18:28 am »
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.
 

Offline asmi

  • Super Contributor
  • ***
  • Posts: 2872
  • Country: ca
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #5 on: November 06, 2024, 02:40:39 pm »
I wonder why do you need to set this security bit at all?

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2139
  • Country: au
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #6 on: November 06, 2024, 06:59:28 pm »
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.

I found this :
https://www.hackup.net/2020/01/erasing-and-programming-the-atf1504-cpld/

He says this

So 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!
 

Offline deanclaxtonTopic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: au
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #7 on: November 06, 2024, 10:29:10 pm »
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).

« Last Edit: November 06, 2024, 10:33:44 pm by deanclaxton »
 

Offline deanclaxtonTopic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: au
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #8 on: November 06, 2024, 10:32:08 pm »
I wonder why do you need to set this security bit at all?

You 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.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2139
  • Country: au
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #9 on: November 06, 2024, 11:06:39 pm »

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.

You 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 ?
 

Offline deanclaxtonTopic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: au
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #10 on: November 07, 2024, 01:49:37 am »
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.
« Last Edit: November 07, 2024, 02:47:17 am by deanclaxton »
 

Offline caius

  • Regular Contributor
  • *
  • Posts: 195
  • Country: it
    • Caius Arcade Repairs & Engineering
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #11 on: November 08, 2024, 04:56:24 pm »
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
 
The following users thanked this post: bingo600, deanclaxton

Offline deanclaxtonTopic starter

  • Regular Contributor
  • *
  • Posts: 211
  • Country: au
Re: Re-programming Secure Microchip ATF150x series CPLD devices
« Reply #12 on: December 05, 2024, 11:11:23 pm »
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.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf