Mach XO2 256HC programming failing - Page 1
Forum section: electronics / general

author: Axk
author_rank: Regular Contributor
timestamp: February 23, 2019, 06:14:51 pm
content: Made a test breakout board for LCMXO2-256HC-4SG32 (QFN 32)Cannot program it, the programmer is failing with the following:Loading logical preference informationFinish loading logical preference fileLoading logical design informationFinish loading logical design informationStarting: "pgr_program run"INFO - Check configuration setup: Start.INFO - JTAG Chain Verification. No Errors.INFO - Check configuration setup: Successful.INFO - Device1 LCMXO2-256HC: FLASH Erase,Program,VerifyERROR -function CHECK_SECURITY_PROTECT_KEYERROR - Process Operation Failed.INFO - Elapsed time: 00 min : 00 secERROR - Operation: unsuccessful.ERROR: pgr_program failed.ERROR - Programming failed.I've added a 4.7K pulldown to TCK, also connected TDO, TDI and TMS.Is it just bad soldering or bad chip?I'm new to soldering QFN packages. Used drag soldering with a gel flux (Flux Plus NC)First soldered the exposed pad with solder paste and hot air, then applied flux and drag soldered the pads.Kind of difficult to check electical connections to the pads with this type of packageThere seems to be no shorts from my continuity testing.Any other diagnostics in Diamond to tell if the device is properly connected except trying to run the programming?

author: Axk
author_rank: Regular Contributor
timestamp: February 23, 2019, 07:53:23 pm
content: I tried running the programming without the TCK pin connected and it gave a different error:Device#1 LCMXO2-256HC: Failed to verify the ID(Expected: 0x012B8043 Read: 0xFFFFFFFF).ERROR - Check configuration setup: Unsuccessful.ERROR: pgr_program failed.ERROR - Programming failed.Does it mean the JTAG connection is fine?

author: Axk
author_rank: Regular Contributor
timestamp: February 23, 2019, 09:40:34 pm
content: Tried soldering 3 chips now.The first one was giving me this CHECK_SECURITY_PROTECT_KEY error.The second one was givingDevice#1 LCMXO2-256HC: Failed to verify the ID(Expected: 0x012B8043 Read: 0xFFFFFFFF).so I suppose I baked the second one.The third one is giving me the CHECK_SECURITY_PROTECT_KEY.So probably this is not my soldering that is causing this.

author: tsman
author_rank: Frequent Contributor
timestamp: February 23, 2019, 10:04:28 pm
content: Where did you get these parts? Are they new? It sounds like it is complaining about the security bits which prohibit reading or programming. There is a OTP bit that permanently blocks reading or programming.

author: Axk
author_rank: Regular Contributor
timestamp: February 23, 2019, 10:07:40 pm
content: From Alibaba from China.A lot of hastle and additional expense to order from Digikey and such where I live.Not 100% they are new, but look new.

author: TimCambridge
author_rank: Regular Contributor
timestamp: February 24, 2019, 01:28:56 am
content: Verify ID is OK, so the JTAG chain is working.Working from memory.... now you need to read the "FEABITS" - that should tell you whether the part has been locked - what Lattice call "myASSP." Try a programmer command that's something like "verify the feature bits".

author: Axk
author_rank: Regular Contributor
timestamp: February 24, 2019, 05:34:36 pm
content: Trying to find the programmer software that supports reading these bits.The diamond progammer doesn't appear to have this option.A KB articlehttp://www.latticesemi.com/en/Support/AnswerDatabase/4/1/0/4104refers to using the ispVM programmer, but I cannot find a version that supports MachXO2 devices.

author: Axk
author_rank: Regular Contributor
timestamp: February 24, 2019, 09:32:59 pm
content: An older version of diamond programmer software kind of works, it doesn't give any errors and the part reacts to the programming.But it doesn't see the clock input for some reason.The same basic design works fine in an RTL simulation.

author: Sarcarean
author_rank: Contributor
timestamp: February 27, 2019, 10:06:34 am
content: If you have access to an ATMEGA32U2, you can use the SVF_Player.fcs script/software to program the MachXO2 using JTAG mode. The SVF player was updated last month to support all of the Lattice devices.

author: Axk
author_rank: Regular Contributor
timestamp: March 15, 2019, 06:47:16 pm
content: Ordered the same part from arrow.The same programming error...This must be me then, but what am I doing wrong then if the JTAG chain works...?My lattice programmer from ebay maybe? (works fine with LCMXO2-1200HC-TG144C)

author: TimCambridge
author_rank: Regular Contributor
timestamp: March 16, 2019, 03:04:24 am
content: Check that you don't have something active connected to the DONE, INIT, Sn, JTAGENB, etc. pins.The bug could be something that becomes active when the part is programmed - OK at the start when all the FPGA outputs are inactive and floating weakly high, bad when the outputs go active.

author: ale500
author_rank: Frequent Contributor
timestamp: March 16, 2019, 06:27:59 am
content: Could you please post the schematic and some board layout pictures, maybe there is something wrong with the schematic itself. These chips have several VCC PINS did you connect them all ?

author: Axk
author_rank: Regular Contributor
timestamp: March 16, 2019, 11:23:06 am
content: I did skimp on some of the recommended pull-up and pull-down resistors that I had used in the LCMXO2-1200HC-4TG144C board.But I've added these exteranally and still getting the same result.I've just re-checked the VCC and ground pins and they appear to be fine.Attached is the portion of the schematic that is related to the programmer.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: March 17, 2019, 10:45:32 am
content: Which programmer are you using?With the Lattice USB programmer I always had to add about 22-33pf from TCK to ground for it to work, on multiple different FPGA familiess

author: Axk
author_rank: Regular Contributor
timestamp: March 17, 2019, 02:06:49 pm
content: QuoteA USB programmer from ebay, labeled and detected by the Diamond programmer as HW-USBN-2AI've tried adding a 33pf from TCK to ground (on an external breadboard) and it is still failing with the same "ERROR - function CHECK_SECURITY_PROTECT_KEY"This same programmer works fine with LCMXO2-1200HC-TG144C.Maybe I should try a different programmer...

author: TimCambridge
author_rank: Regular Contributor
timestamp: March 17, 2019, 06:15:27 pm
content: Quote from: Axk on March 16, 2019, 11:23:06 amThe programmer that you have is usually realiable.You need to give us more of the schematic, a snip isn't enough.

author: Axk
author_rank: Regular Contributor
timestamp: March 17, 2019, 08:49:24 pm
content: D'oh!It works now.2 aspects:1. The programming doesn't work with the latest version of the diamond programmer (3.10.3.144), it gives this weird "function CHECK_SECURITY_PROTECT_KEY" error (I guess this is because the cable needs a firmware update, the only info I've found on Security Protect Key is that it's a feature of the Lattice XO3 family)2. An older version of the Diamond programmer (3.8.0.115.3) does work, it was my bad solderingI soldered the JTAG "pins" correctly, but the "pins" I was trying to blink the test LEDs with were not soldered properly (or maybe the power "pin" for the bank)Takeaway - when hand-soldering QFN packages make sure to apply as much solder as possible and still doesn't short the "pins" (also make the pads longer so that you have room for the soldering iron to apply solder).I didn't use the capacitor between TCK and ground (but will provision for it in my future boards just in case).The JTAG pins connected in my case are: TDI, TDO, TCK (with a 4.7K pulldown) and TMS

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: March 17, 2019, 11:00:14 pm
content: Quote from: Axk on March 17, 2019, 08:49:24 pmThis is specific to the LAttice USB programmer, which may have been fixed as it's a pretty old unit, so I wouldn't bother, as it may cause issues with other programmers - put it on the programmer instead if it's an issue

author: TimCambridge
author_rank: Regular Contributor
timestamp: March 18, 2019, 11:08:02 am
content: Quote from: Axk on March 17, 2019, 08:49:24 pmThough it may have been fixed via updates, I haven't had luck with Diamond 3.10. I'm still on 3.9, plus 2.0 for some stuff that got removed in the 3.x releases.