-
Notifications
You must be signed in to change notification settings - Fork 66
CH341A Programmer
There are several versions of the popular, inexpensive, and versatile 24/25 series EEPROM programmer.
Older model, the black one with the gold edge (rarely green with a silver edge), is the cheapest. But it has a nasty hardware quirk which must be fixed before you can use the programmer with any 3.3V flash chip.
I prefer this fork of SNANDer, but there is also
- Original SNANDer
- microsnander from OpenIPC
- ch341prog
- flashrom
The programming clip allows you to read and write the contents of the flash memory chip without having to desolder the chip.
Connect the clip to the CH341A programmer using a DIP8 adapter and gently pinch the chip with the clip jaws. In your computer, run snander -i
and confirm the chip is detected.
Use snander -r <filename>
to save a copy of the flash chip content to a file.
Repeat the procedure of reading twice back to back using different filenames. Then compare checksums of these files.
md5sum <filename1> <filename2>
If the checksums match, the firmware is saved correctly. If they don't, check your setup and repeat the process until you get two identical files.
Use snander -e && snander -w <filename> -v
to erase the flash chip clean and write a new firmware to it with verification of the result.
To make the CH341A work on a Raspberry PI, you must add these to /boot/cmdline.txt
:
dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0
Early versions, prior to version 1.7, of the cheap and popular CH341A mini programmer have a nasty bug where the voltage levels on the data lines remain at 5V even though the programmer is jumpered to 3.3V.
@ddemos1963 came up with an interesting hack to solve the problem in an efficient and artistic way.
Here's what you need to do.
Sever the connection between the 5V power line and the CH341A chip. Use a sharp utility knife to cut the trace on the backside of the programmer board.
Connect the 3.3V output leg of the voltage regulator to pin 9 of the CH341A IC by bridging it to a corresponding trace at the capacitor located nearby.
Restore power to the chip by re-routing the 3.3V voltage from the 3v3 pin to pin 28 of the CH341A IC through the 5V pin connector on the header.
- DIY BCQ CH341A forum (Chinese, use Chrome automatic translation)
- CH341A Programmer (Russian, use Chrome automatic translation)