[Guide] How to Use a CH341A SPI Programmer/Flasher (with Pictures!)

If you’re worried about flashing your motherboard with an SPI Programmer, then this is the guide for you. Each step is explained in detail, with pictures. We’ll go over everything, from buying your Programmer to flashing your chip with Flashrom.

As per usual, this is a tutorial on the internet. Do anything you see here at your own risk. I am not responsible if anything goes wrong.

This tutorial couldn’t have been possible without:

Fernando, for the Win-Raid Forum,
ProIIIu3Hb, for their PIII Discord server,
dsanke, for being a BIOS modding god,
Droidbot and ylp1194045441, for helping me with the guide,
CodeRush for their original tutorial, and
deftdawg, for their original tutorial.

Part Zero: Equipment Required

1. CH341A SPI Programmer with SOIC8 Test Clip
2. Linux computer with Flashrom installed OR a Live USB with Linux

Part One: Buying

This is the easiest part of the guide :wink: (but that doesn’t mean the rest is hard!)

All you have to do is buy a kit like this:
https://www.ebay.com/itm/EEPROM-BIOS-USB…er/192742554355

It has everything you need, from the Programmer itself, a 1.8v adapter (for AMD AM4 motherboards - more on that later), the SOIC8 Test Clip, and a bunch of other parts you might find useful later.

Part Two: Linux

If you are trying to flash your board with an SPI, there’s a good chance you already know the basics of Linux. Even if you don’t, though, I’ll still go over it.

Since the Windows tool has severe issues with some chips and doesn’t have an auto-verification system, your best bet is to do the flash from a Linux computer. If you don’t have one, you can use the instructions in the following paragraphs to set up a Live USB with Linux (a Live USB is one which contains an OS you can boot from and use as a normal computer). If you do have a Linux system already, you can skip to the next part of the guide.

First, download a Linux ISO. A distribution like Linux Mint XFCE is what I would recommend for a newcomer. You can grab the latest version (19.1) from here:
https://linuxmint.com/edition.php?id=265

Then, download the Universal USB Installer tool from here:
https://www.pendrivelinux.com/universal-…-easy-as-1-2-3/

Next, plug in a USB of at least 8GB and load your ISO into UUI. Make sure you select the right drive, ISO image, and Distribution. Remember to check the box to format the drive, and select about 1GB of persistence space. When you are done, it should look like this:

Capture.PNG



Once your USB has been created, you are ready for the next section.

Part Three: The Flash

Before we do anything, we need to install a cool piece of software called Flashrom. It will allow us to program our BIOS chip with minimal issues. Fire up your Linux computer or your Live USB, connect your CH341A, open up the Terminal from the menu, and run the following command:

1
 
sudo apt-get install flashrom
 

Next, you need to figure out if your BIOS chip is socketed, or soldered. If you have a very cheap motherboard, a laptop, a graphics card, or a 200-series motherboard or newer, you will most likely have a soldered BIOS chip.

This is what a socketed chip looks like:



This is what a soldered chip looks like:



If your motherboard’s BIOS chip is socketed, you’re in luck! You can get away with using the CH341A on its own. You need to remove the chip first, like so (tweezers work):



Then you need to install it in the Programmer, making sure the notch faces the same way as indicated in the white diagram in the bottom right corner:



If you have a soldered BIOS chip, the process is a little different. Instead of installing your BIOS chip into the programmer, you need to attach the plug end of the SOIC8 clip onto the small green part of your kit with the yellow pins sticking out. You need to make sure the red wire is corresponding to the pin numbered ‘1’. Then, you need to insert that assembly into the the CH341A. For this, the white dot in the small diagram should match the ‘1’ pin. When you are done, your now clip-ified Programmer should look like this:



Note: If you are flashing an AMD motherboard, you need to put the 1.8V adapter into the SPI, and then put the clip assembly onto that.

You must now attach the SOIC8 clip to the BIOS chip, like in this picture:



Now, we are ready to flash. Execute the following command in the terminal:

1
 
sudo flashrom --programmer ch341a_spi -r backup.bin
 

This will back up your original BIOS, in the event of a failure. If you are using a SOIC8 clip and get an error, don't worry, this is normal. The clip is very hard to mount correctly, so just take it off and try again, until the command succeeds.

When the backup finishes, we can flash our new BIOS. Run this command, making sure to insert your new BIOS' correct name:
1
 
sudo flashrom --programmer ch341a_spi -w <new bios name>
 

If you have done everything correctly, your new BIOS should be loaded onto your BIOS chip!

If it didn't work, or you need further clarification, feel free to contact me by replying to this thread.

Edit by Fernando: Thread title shortened

7 Likes

Nice!

Nice tutorial! +1 for using flashrom instead of that garbage provided on Windows.

Zitat von _haru im Beitrag #1
If you're worried about flashing your motherboard with an SPI Programmer, then this is the guide for you. Each step is explained in detail, with pictures. We'll go over everything, from buying your Programmer to flashing your chip with Flashrom.

As per usual, this is a tutorial on the internet. Do anything you see here at your own risk. I am not responsible if anything goes wrong.

This tutorial couldn't have been possible without:

Fernando, for the Win-Raid Forum,
ProIIIu3Hb, for their PIII Discord server,
dsanke, for being a BIOS modding god,
Droidbot and ylp1194045441, for helping me with the guide,
CodeRush for their original tutorial, and
deftdawg, for their original tutorial.

Part Zero: Equipment Required

1. CH341A SPI Programmer with SOIC8 Test Clip
2. Linux computer with Flashrom installed OR a Live USB with Linux

Part One: Buying

This is the easiest part of the guide ;) (but that doesn't mean the rest is hard!)

All you have to do is buy a kit like this:
https://www.ebay.com/itm/EEPROM-BIOS-USB...er/192742554355

It has everything you need, from the Programmer itself, a 1.8v adapter (for AMD AM4 motherboards - more on that later), the SOIC8 Test Clip, and a bunch of other parts you might find useful later.

Part Two: Linux

If you are trying to flash your board with an SPI, there's a good chance you already know the basics of Linux. Even if you don't, though, I'll still go over it.

Since the Windows tool has severe issues with some chips and doesn't have an auto-verification system, your best bet is to do the flash from a Linux computer. If you don't have one, you can use the instructions in the following paragraphs to set up a Live USB with Linux (a Live USB is one which contains an OS you can boot from and use as a normal computer). If you do have a Linux system already, you can skip to the next part of the guide.

First, download a Linux ISO. A distribution like Linux Mint XFCE is what I would recommend for a newcomer. You can grab the latest version (19.1) from here:
https://linuxmint.com/edition.php?id=265

Then, download the Universal USB Installer tool from here:
https://www.pendrivelinux.com/universal-...-easy-as-1-2-3/

Next, plug in a USB of at least 8GB and load your ISO into UUI. Make sure you select the right drive, ISO image, and Distribution. Remember to check the box to format the drive, and select about 1GB of persistence space. When you are done, it should look like this:


Once your USB has been created, you are ready for the next section.

Part Three: The Flash

Before we do anything, we need to install a cool piece of software called Flashrom. It will allow us to program our BIOS chip with minimal issues. Fire up your Linux computer or your Live USB, connect your CH341A, open up the Terminal from the menu, and run the following command:
1
 
sudo apt-get install flashrom
 

Next, you need to figure out if your BIOS chip is socketed, or soldered. If you have a very cheap motherboard, a laptop, a graphics card, or a 200-series motherboard or newer, you will most likely have a soldered BIOS chip.

This is what a socketed chip looks like:


This is what a soldered chip looks like:


If your motherboard's BIOS chip is socketed, you're in luck! You can get away with using the CH341A on its own. You need to remove the chip first, like so (tweezers work):


Then you need to install it in the Programmer, making sure the notch faces the same way as indicated in the white diagram in the bottom right corner:


If you have a soldered BIOS chip, the process is a little different. Instead of installing your BIOS chip into the programmer, you need to attach the plug end of the SOIC8 clip onto the small green part of your kit with the yellow pins sticking out. You need to make sure the red wire is corresponding to the pin numbered '1'. Then, you need to insert that assembly into the the CH341A. For this, the white dot in the small diagram should match the '1' pin. When you are done, your now clip-ified Programmer should look like this:


Note: If you are flashing an AMD motherboard, you need to put the 1.8V adapter into the SPI, and then put the clip assembly onto that.

You must now attach the SOIC8 clip to the BIOS chip, like in this picture:


Now, we are ready to flash. Execute the following command in the terminal:
1
 
sudo flashrom --programmer ch341a_spi -r backup.bin
 

This will back up your original BIOS, in the event of a failure. If you are using a SOIC8 clip and get an error, don't worry, this is normal. The clip is very hard to mount correctly, so just take it off and try again, until the command succeeds.

When the backup finishes, we can flash our new BIOS. Run this command, making sure to insert your new BIOS' correct name:
1
 
sudo flashrom --programmer ch341a_spi -w <new bios name>
 

If you have done everything correctly, your new BIOS should be loaded onto your BIOS chip!

If it didn't work, or you need further clarification, feel free to contact me by replying to this thread.[



If you have a 25xx socketed BIOS does the BIOS plug into the left socket or the right socket in the picture? Into the BIOS programmer I mean, left side or right?

@KedarWolf - Opposite of the lever, middle of the socket, pin one is on lever side. See here also for additional images

Zitat von _haru im Beitrag #1
If you're worried about flashing your motherboard with an SPI Programmer, then this is the guide for you. Each step is explained in detail, with pictures. We'll go over everything, from buying your Programmer to flashing your chip with Flashrom.

As per usual, this is a tutorial on the internet. Do anything you see here at your own risk. I am not responsible if anything goes wrong.

This tutorial couldn't have been possible without:

Fernando, for the Win-Raid Forum,
ProIIIu3Hb, for their PIII Discord server,
dsanke, for being a BIOS modding god,
Droidbot and ylp1194045441, for helping me with the guide,
CodeRush for their original tutorial, and
deftdawg, for their original tutorial.

Part Zero: Equipment Required

1. CH341A SPI Programmer with SOIC8 Test Clip
2. Linux computer with Flashrom installed OR a Live USB with Linux

Part One: Buying

This is the easiest part of the guide ;) (but that doesn't mean the rest is hard!)

All you have to do is buy a kit like this:
https://www.ebay.com/itm/EEPROM-BIOS-USB...er/192742554355

It has everything you need, from the Programmer itself, a 1.8v adapter (for AMD AM4 motherboards - more on that later), the SOIC8 Test Clip, and a bunch of other parts you might find useful later.

Part Two: Linux

If you are trying to flash your board with an SPI, there's a good chance you already know the basics of Linux. Even if you don't, though, I'll still go over it.

Since the Windows tool has severe issues with some chips and doesn't have an auto-verification system, your best bet is to do the flash from a Linux computer. If you don't have one, you can use the instructions in the following paragraphs to set up a Live USB with Linux (a Live USB is one which contains an OS you can boot from and use as a normal computer). If you do have a Linux system already, you can skip to the next part of the guide.

First, download a Linux ISO. A distribution like Linux Mint XFCE is what I would recommend for a newcomer. You can grab the latest version (19.1) from here:
https://linuxmint.com/edition.php?id=265

Then, download the Universal USB Installer tool from here:
https://www.pendrivelinux.com/universal-...-easy-as-1-2-3/

Next, plug in a USB of at least 8GB and load your ISO into UUI. Make sure you select the right drive, ISO image, and Distribution. Remember to check the box to format the drive, and select about 1GB of persistence space. When you are done, it should look like this:


Once your USB has been created, you are ready for the next section.

Part Three: The Flash

Before we do anything, we need to install a cool piece of software called Flashrom. It will allow us to program our BIOS chip with minimal issues. Fire up your Linux computer or your Live USB, connect your CH341A, open up the Terminal from the menu, and run the following command:
1
 
sudo apt-get install flashrom
 

Next, you need to figure out if your BIOS chip is socketed, or soldered. If you have a very cheap motherboard, a laptop, a graphics card, or a 200-series motherboard or newer, you will most likely have a soldered BIOS chip.

This is what a socketed chip looks like:


This is what a soldered chip looks like:


If your motherboard's BIOS chip is socketed, you're in luck! You can get away with using the CH341A on its own. You need to remove the chip first, like so (tweezers work):


Then you need to install it in the Programmer, making sure the notch faces the same way as indicated in the white diagram in the bottom right corner:


If you have a soldered BIOS chip, the process is a little different. Instead of installing your BIOS chip into the programmer, you need to attach the plug end of the SOIC8 clip onto the small green part of your kit with the yellow pins sticking out. You need to make sure the red wire is corresponding to the pin numbered '1'. Then, you need to insert that assembly into the the CH341A. For this, the white dot in the small diagram should match the '1' pin. When you are done, your now clip-ified Programmer should look like this:


Note: If you are flashing an AMD motherboard, you need to put the 1.8V adapter into the SPI, and then put the clip assembly onto that.

You must now attach the SOIC8 clip to the BIOS chip, like in this picture:


Now, we are ready to flash. Execute the following command in the terminal:
1
 
sudo flashrom --programmer ch341a_spi -r backup.bin
 

This will back up your original BIOS, in the event of a failure. If you are using a SOIC8 clip and get an error, don't worry, this is normal. The clip is very hard to mount correctly, so just take it off and try again, until the command succeeds.

When the backup finishes, we can flash our new BIOS. Run this command, making sure to insert your new BIOS' correct name:
1
 
sudo flashrom --programmer ch341a_spi -w <new bios name>
 

If you have done everything correctly, your new BIOS should be loaded onto your BIOS chip!

If it didn't work, or you need further clarification, feel free to contact me by replying to this thread.



So, if I save the BIOS as a .bin file with UBU Tool or something with the Windows and Linux based tools I can flash the .bin file, correct?
1 Like

That depends, you cannot simply rename an encapsulated BIOS file (Like Asus) .bin or .rom and it’s fine, you need to remove the BIOS body from the capsule first using UEFITool, then it can be bin/rom. Then bin=rom same/same to any application.



That’s a 25XX chip in the picture of the directly installed BIOS chip, so plug it in the exact same way.



What Lost_N_BIOS said. AFAIK only Asus and sometimes ECS make you convert it from CAP to BIN though.



Not sure how to remove the BIOS body on a Z390 Gigabyte BIOS with UEFI Tool. I found a guide for Asrock but not the same.

Can you help?

Edit: I let UBU Tool convert the Gigabyte BIOS into a bios.bin when exiting the tool.

I booted into Linux Mint, made a backup, flashed the bios.bin, it flashed and verified correctly.

Am I done here, can I put my motherboard back into my system and boot from the flashed and verified BIOS?

@KedarWolf - saving a BIOS in UEFITool does not convert anything, it simply adds .rom extension to whatever the original file extension is when you save or rebuild/save
To extract body from an encapsulated BIOS file you have to right click in the middle where it says “AMI Aptio Capsule” and choose “Extract Body” that you can name whatever you want .bin/.rom (Same) << That is only way you make a rom out of a encapsulated BIOS.

Sorry, I will leave above for others, but I just realized you said UBU not UEFITool. UBE will remove the Asus capsule and give you a rom/bin file, so that would apply here if Asus (Also removes Asrock internal capsule, but this is not same thing as Asus)

Gigabyte BIOS is .rom/.bin format already, not encapsulated so nothing like that is needed. If your programmer wont take the BIOS extension name like F12 or F3b for example. simply rename to .bin or .rom

I can’t answer rest of your questions at the end, unsure what Liniuz has to do with any of this or how you backed up or flashed what, etc.

@_haru

You do refer to a Linux english version which is adapted to QWERTY keyboard.
Do you have a solution/version compatible with AZERTY keyboard used in some countries such as in France ?

@100PIER

It shouldn’t make a difference. Just make sure your input method is set to AZERTY in settings.

thanks, i have done. I have AZERTY France now.
When booting do we have select booting with acpi=off ?
About update drivers I get failure, do I have to update drivers ?
Why internet connection does seem to broke regularly without any reason ?

You shouldn’t need to select acpi=off.

You shouldn’t need to update drivers.

Your internet disconnecting could be because of a number of things.

_huru,
I do use flashrom v0.9.9+r1954-1, however I get this error when trying a simple backup operation:
"flashrom v0.9.9-r1954 on Linux 4.15.0-20-generic (x86_64)
Calibrating delay loop… delay is unreliable, trying to continue OK.
No EEPROM/flash device found
"
What is wrong ?
The 128 Mbits BIOS component is labeled MXIC MX25L12873F M2I-10G.
Does this recent component must be manually updated somewhere in flashrom Database ?

@100PIER :
If you want, that the starter of this thread gets notified, you should write his nickname correctly and put an “@” in front of it.

@_haru :
Please answer 100PIER’s questions.

Thanks @Fernando :smiley:

@100PIER Make sure your SPI clip is correctly fastened onto the chip. I’ve dealt with that chip before, it should work with Flashrom. Keep adjusting the clip until something changes.

These clips are usually very low quality, so yours might be broken. You’ll have to buy another like I had to :frowning:

@_haru
Thanks to report these bad quality issue you also have observed with SOIC8 SPI clip.
I 'll buy another clip.
I do observe near the BIOS component on the motherboard a set of 9 pins very very too close which does may be avoid to set properly the clip on the 8 legs.
I have tried to bend these 9 pins (nowhere documented into ASUS Guide of the mboard). May be I have to cut them so the clip be better positionned, or may be I have to mod the clip himself…

@_haru

I do some significant progress after manually modified the mechanical size of the SOIC clip so that it does apply a correct contact on the 8 legs of the BIOS component.
As I described the BIOS component is very near from a set of 9 extras pins (not documented) and the clip can’t be properly clipped without doing some ‘manual mechanical adaptation’ on one side of the clip.

However, I got these messages:

"Calibrating delay loop… OK.
Found Macronix flash chip “MX25L12805D” (16384 kB, SPI) on ch341a_spi.
Found Macronix flash chip “MX25L12835F/MX25L12845E/MX25L12865E” (16384 kB, SPI) on ch341a_spi.
Multiple flash chip definitions match the detected chip(s): “MX25L12805D”, “MX25L12835F/MX25L12845E/MX25L12865E”.
Please Specify which chip definition to use with the -c <chipname> option.
"

So, it does seem the BIOS component labelled MX25L12873F is unknown from flashrom software…

What exact (backup operation) command line ,if any, be correct to fix this problem ?
Do we have to mod/update “flashrom” software somewhere ?

What do you recommend to progress on the CH341A SPI Programmer/Flasher procedure compatible with this recent ASUS Prime Z390M-Plus motherboard ?

Thanks for your awaited comments.

@100PIER

On my Z390 Aorus Master, a USB BIOS programmer never worked until I tried the 1.4 version of the flash programmer provided by Lost_N_BIOS using Windows and the USB drivers provided.

1 Like