Fixing Issues With Knockoff Altera USB Blasters

Using an external MCU as a crude clock source for the Altera CPLD. (Credit: [Doug Brown])
One exciting feature of hardware development involving MCUs and FPGAs is that you all too often need specific tools to program them, with [Doug Brown] suffering a price tag aneurysm after checking the cost of an official Altera/Intel USB Blaster (yours for $300) to program a MAX 10 FPGA device with. This led him naturally down the path of exploring alternatives, with the $69 Terasic version rejected for ‘being too expensive’ and opting instead for the Waveshare USB Blaster V2, at a regretful $34. The amazing feature of this USB Blaster clone is that while it works perfectly fine under Windows, it works at most intermittently under Linux.

This led [Doug] down the path of reverse-engineering and diagnosing the problem, ultimately throwing in the towel and downclocking the Altera CPLD inside the adapter after finding that it was running a smidge faster than the usual 6 MHz. This was accomplished initially by wiring in an external MCU as a crude (and inaccurate) clock source, but will be replaced with a 12 MHz oscillator later on. Exactly why the problem only exists on Linux and not on Windows will remain a mystery, with Waveshare support also being clueless.

Undeterred, [Doug] then gambled on a $9 USB Blaster clone (pictured above), which turned out to be not only completely non-functional, but also caused an instant BSOD on Windows, presumably due to the faked FTDI USB functionality tripping up the Windows FTDI driver. This got fixed by flashing custom firmware by [Vladimir Duan] to the WCH CH552G-based board after some modifications shared in a project fork. This variety of clone adapters can have a range of MCUs inside, ranging from this WCH one to STM32 and PIC MCUs, with very similar labels on the case. While cracking one open we had lying around, we found a PIC18 inside, but if you end up with a CH552G-based one, this would appear to fully fix it. Which isn’t bad for the merest fraction of the official adapter.

Thanks to [mip] for the tip.

15 thoughts on “Fixing Issues With Knockoff Altera USB Blasters

  1. Just like with power tools, you can waste time, effort and money buying various Kakitas, Parksides and other tool-shaped objects hoping you’ll get the unicorn; or you could get the real thing and just get the job done.

    1. It’s a bit different from power tools in that it really is possible to perform the needed task for $10, but the chip vendor decided that they would prefer to charge more for the board needed to do that. You’re not paying for carefully wound motors or mechanical strength like you are with a power tool.

      If you don’t have an extra $300 sitting around because you’re a college student or wanting to try a new hobby without spending tons, then it makes sense to try this kind of thing first. Plus, it has the advantage of getting you a deeper understanding of how it all works.

      1. It’s also a bit different because the Real Thing is not actually even a good tool to begin with. It’s only “worth it” because (in theory) you can complain to Big Expensive Company if it doesn’t work right and they will (supposedly) Make It Work.

        Of course, in *reality* they’ll just blame you and you’ll have to fix their stuff anyway. No, I’m not bitter and jaded, why would you say that?

        1. No clue about Altera, but Xilinx (AMD)’s tools are ridiculously bad in some ways. Half of the time the adapter doesn’t connect, or doesn’t detect the FPGA, or gets stuck in an unusable state. And the software for older FPGAs, Xilinx ISE for Windows 10, is literally an Oracle Server Linux VM with ISE on it, despite a Windows 7 version of ISE already existing (it just doesn’t run on Windows 10 for some reason).

          1. Yeah, that’s the Platform Cable USB, because it actually gets programmed multiple times before being used. Hence the recommendation (below) to just use the FT232H-based tools, or build one yourself. Those are not only more reliable but significantly faster.

    2. It’s not like power tools, there’s nothing in the official blaster that makes it significant more expensive to manufacture and it’s not hard to get those “unicorns”
      I’ve two sub $10 clone blasters that have been working without any trouble for the past 5 years.

    1. I’d actually say “just build your own,” since honestly the Altera designs are boneheaded dumb anyway since there’s no option to run the JTAG clock below 6 MHz. Depending on the hardware, the *official* ones might not work, either. Altera’s older USB blaster (which was around way too long) didn’t have *any* way to modify the JTAG clock speed at all.

      There are solutions out there to handle an FT232H/2232H in Quartus. It’s frustrating as hell that this doesn’t work out of the box like it now does in Vivado.

    1. And even if it’s not worth your time to get _one_ of the $9 blaster clones working vs just ponying up for the more expensive one — you have now shared it with tens of thousands of people.

      If a few hundred people end up using this hack, that’s $10,000 we collectively have to spend on other parts. :) Well worth a night’s work. Thanks for sharing!

      1. There are also Long Journeys that people have gone through with Quartus for various boards that just did the sane thing and threw an FT232H (or FT2232H) on the board as a programming interface, e.g.:

        https://j-marjanovic.io/stratix-v-accelerator-card-from-ebay-part-3.html

        An FT232H/2232H solution is by far the best option since you end up with a cable that works *both* with Xilinx and Altera. Getting it to work with Xilinx stuff has been made trivial – unfortunately Altera still requires a massive amount of jumping through hoops.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.