Close

Dirt Cheap USB Blaster Clones Considered Harmful

A project log for FPGA Experiments

Log book of FPGA adventures at home

tom-verbeureTom Verbeure 04/11/2018 at 06:156 Comments

(Also published here.)

Dirt cheap USB blaster clones considered harmful... or at least non-functional.

My very first hobby FPGA boards was the popular EP2C5T144 Mini System Learning board with the smallest Altera Cyclone II FPGA. You can find them for $12 on AliExpress. 

To program the board, you also need a USB Blaster: Altera's version of a JTAG cable.  These, too, can be found on AliExpress for less than $3. It's really a steal. (Identical copies sell for $10 on Amazon.)

I've been able to make this cable work with the EP2C5 board so I thought it was all good.

However, I'm now in the process of reverse engineering the eeColor Color3 board (which conveniently has the JTAG connector still populated), and I spend more than an hour trying to get it work. Quartus was able to detect the USB Blaster, but most of the time it didn't even detect the JTAG chain. And if it did, it'd detect the wrong JTAG chip ID. And I never managed to get a bitstream programmed.

Now what?

Well, you try out another JTAG clone: : the Terasic USB Blaster. It sells for $50 on the Terasic website and $70 on Amazon, which is still $230 less than the official real thing from Altera.

I plugged it in and ... voila! ... everything worked like a charm.

I suspect that the dirt cheap ones have really crappy level shifters (if they have them at all.)

Discussions

K.C. Lee wrote 04/12/2018 at 07:20 point

FYI: My $3 USB Blaster uses 74LVC125 as the output translator with 10 ohms series termination.  The Vcc_Target is used to power the LVC125 so it output is set to the correct level. TDO from target is fed back to the F321 Microcontroller directly.

They should be using 100 ohms for termination as it is the reasonable termination into loose or ribbon cables.  Could be a case of someone misread resistor pack marking 100 as 100 ohms.  100 is 10 ohms while 101 is 100 ohms.  Other than that I have no issues with the output translation path.

While the F321 is 5V tolerant and powered from 3.3V, it might have a hard time seeing the right logic level if the FPGA JTAG I/O rail is below 2.5V. i.e. much newer FPGA.

I guess I would change the resistor packs at a start.

And yes, I designed my own clone at one point.  https://hackaday.io/project/2213-tusb-blaster

  Are you sure? yes | no

Tom Verbeure wrote 04/12/2018 at 14:54 point

I was wondering at first if it might be a voltage IO issue, but the Color3 board uses 3.3V for the IO rails everywhere (though I’m going to reconfirm this once my scope arrives.)

As for designing my own USB blaster: that was also on my long hobby project list, but somewhere at the bottom. So I’ll probably pass on that one. :-)

  Are you sure? yes | no

K.C. Lee wrote 04/14/2018 at 01:47 point

I think it might be a signal integrity issue.  Your cheap Chinese FPGA board is likely double sided without controlled impedance, so the traces have very high impedance pretty close to ribbon cable at >100 ohms. i.e. no reflection caused by the FPGA.

Your Color3 board looks like a multilayer board and are likely to have controlled impedance say 60 ohms. So there might be a reflection caused by impedance mismatch at the board connector.  If you can add some series resistors at the blaster side, it would help to damp out the reflections.

I have seen problem with using my SiLab eval board for programming external uC because they didn't have any series termination.  After I soldered in 51R at the connector, the problem goes away.

  Are you sure? yes | no

Tom Verbeure wrote 04/13/2018 at 17:34 point

K.C.,

If one were to hack a USB Blaster with, say, a Blue Pill STM32 to connect to a 3.3V target device (so no level shifter needed), do you think you'd still need the termination registers if you program the GPIOs with a very slow slew rate?

  Are you sure? yes | no

K.C. Lee wrote 04/14/2018 at 01:30 point

The answer depends on the length of the cable vs slew rate.

The rule of thumb is that if the propagation delay is within 1/6 of the rise/fall time, then you can get away without worrying about transmission effects. There will still be some minor reflections, but they have low enough amplitudes.

So let say you have 4ns rise time, this let you have up to 666ps of delay in cable (~62% for ribbon) which is about 12.4cm (4.88 inches).

Use proper series termination resistors and not have to worry about these things.

FYI: The slew rate on my KL26 (ARM) is 4ns.

https://cdn.hackaday.io/images/950481408288289199.jpg

  Are you sure? yes | no

Ed S wrote 04/12/2018 at 06:05 point

An interesting finding - I have the same cheap bits, but haven't tried to use them. Thanks for the warning.

  Are you sure? yes | no