Do not use CH341A!
Contents
Summary: If you don’t have one already, there is no reason to buy one ever. The Raspberry Pi Pico is superior in all ways.
NOR flashes on Libreboot systems run on 3.3V or 1.8V DC. CH341A can have 5V logic levels on data lines, which will damage your SPI flash, southbridge, and anything else it is connected to.
These CH341A programmers are unfortunately very popular; do not use it unless you have fixed the data line voltages.
Most people would not bother to fix their CH341As before using them, so we discourage their use and do not provide documentation.
The issue
We are aware that some CH341As (e.g. the green one) can operate at 3.3V. The data lines switch to 3.3V during an erase, read, or write cycle. When no flash operation is underway, the data lines usually output negligeble current. However:
- There are many scenarios where this 5V idle logic level could still be applied such as surge events.
- The drive level is extremely poor, making ISP flashing ill advised (e.g. when PCH on Intel platforms is partly active and data lines have low resistance on some boards).
- The WP/HOLD lines are connected directly to VCC, instead of using a pull-up resistor, easily causing over-currents.
- Crap LDO, and no ESD/overcurrent protection, likely unable to provide much current on VCC, especially in ISP flashing where the flash shares a common power rail with many other components.
The alternative
Get a Raspberry Pi Pico. It’s about the same price, but has much better electrical design, supports a much higher 12mA drive level, can control multiple chip selects at once, has libre boot firmware itself, is completely reprogrammable (so you can repurpose it for other projects when you’re done flashing Libreboot), etc.
When is the CH341A appropriate to use?
The only instance where the CH341A is viable is when flashing a loose chip in its DIP-8 ZIF socket, which could be connected to WSON-8/SOIC-8/SOIC-16 via adapters. There are also adapters to convert voltages to 1.8V.
Even so, we recommend the Raspberry Pi Pico, which could easily be wired to a breadboard for socket flashing. With about the same price you get a good device for ISP flashing, socket flashing, and for any other electronics project that could be done on the Pico.
Could I still use a CH341A despite these issues?
We recommend against the CH341A even with modifications. But anyway:
Option 1: Fixing the CH341A (incl. pull-up resistors on WP/HOLD)
Firstly, complete this guide.
Then:
In the event of a surge such as a short, a directly-connected WP/HOLD could cause a direct short between VCC/ground, which would damage circuitry and potentially cause a fire. Unfortunately, they are directly connected to 3.3V VCC on CH341A dongles.
You should cut these two connections to the WP and HOLD pins.
If you are performing in-system programming of a chip when it is inside the motherboard, it is likely that your motherboard already has pull-up resistors, so you could stop here.
If you want to flash chips in the ZIF socket, you must jump the cuts with pull-up resistors (between 1k to 10k ohms) instead.
These photos show both modifications (3.3V logic and WP/HOLD pull-up resistors) performed, on the black CH341A:
Option 2: Using a logic level converter
Just use them according to the documentation of your logic level converter.