Recently I’ve got an old computer for free, with the downside however that it wasen’t posting. After some troubleshooting, it pointed more and more it the direction of a faulty CMOS Chip. It turned out that the cause of the problem was indeed the BIOS.
So this guide will show you, how to flash your BIOS Chip via USB with an Arduino Uno.
Step 1 – Check Compatibility
Since we are going to use the FlashROM Flasher Program, please make sure that your BIOS Chip is listed in the compatibility list of FlashROM. Basically find the BIOS chip on your mainboard and read off the type number on it.
Please note, that on some mainboards, you first have to remove a sticker from the top of the BIOS Chip to read off the type number. In this guide we’ll be using a MX25L8005 CMOS IC by Macronix.
Step 2 – Get the BIOS for your Mainboard
This step is highly individual and can differ immensely from case to case. However in most cases the mainboard manufacturers are offering BIOS Images on their websites to be downloaded (mostly in the Driver/Support sections). A simple search with your mainboards model number will guide you there.
In my case I had to search a little longer, considering finding a BIOS download page for the (now) 13 year old MSI MS-7504 was quite more difficult that I initially thought. Yet I was able to find a suitable ISO file, whose unpacking lead to a IMG file, whose unpacking again lead to a FreeDOS environment, containing the long searched BIOS image file named “A7504NF1.10Z”.
Step 3 – Get the necessary Packages
Considering that we’re running on Debian, please make sure your system is up to date and has the following packages installed to prepare the flashing environment, demanded by FlashROM and the Arduino flasher frser-duino we’re going to use later.
Now that the packages are installed, we can continue to set up FlashROM.
Step 4 – Get FlashROM
Since FlashROM is going to be sourced from GitHub, changing to a directory for this specific purpose will help us to keep the setup clean.
Now clone FlashROM from its repository, compile and install it.
Step 5 – Arduino Uno Flashing
To make the Arduino Uno suitable to flash BIOS CMOS Chips, we firstly have to flash the Arduino Uno itself with the frser-duino programmer. frser-duino is effectively a successor to the serprog-duino programmer project, just to mention as a side note.
Taking into account that the Arduino Uno is equipped with a ATmega8U2 or ATmega16U2 acting as a USB to Serial converter for the Arduinos main ATmega328P, frser-duino has to be told to use the 8U2/16U2 conversion and not the standard FTDI USB to Serial conversion.
Now connect your Arduino Uno to your PC via USB, to flash the ATmega328P.
Step 6 – Wire up the Arduino to the BIOS Chip
Now we have to be extra careful not to destroy the BIOS Chip completely by applying a wrong voltage to it. In the most cases the Arduino Uno logic levels are 0V and 5V respectively, which is too high for most BIOS Chips. Please refer to the datasheet of your BIOS CMOS Chip for a voltage rating.
The MX25L8005 used in my case for example, is able to handle 2,7V up to 3,6V. Anything above this rating is definitely not healthy for this chip.
A simple voltage divider on a breadboard is just right to adjust the 5V from the Arduino to appropiate 3,3V for the BIOS chip. Affected by this alteration are the CS (Chip Select), SI (Serial Input) and SCLK (Serial Clock) Pins.
This graph shows how to wire your Arduino Uno to your 3,3V BIOS CMOS Chip:
The Oscilloscope shows clearly that the Arduino outputs its 5V quite well. After the voltage divider is implemented, the voltages are much more suitable for the BIOS CMOS Chip:
Step 7 – Flash the BIOS Chip
Now after everything is wired up we can now check if the PC is able to detect the BIOS Chip:
As Line 10 suggests (
Found Macronix flash chip "MX25L8005 [...]), the Chip is now detected.
In this state, we are now able to flash the BIOS Binary to the Chip. Just select the previously downloaded Binary with FlashROMs
-w Parameter and execute the Command.
And thats it. If you have the same/similar console output as showed above, you are now finished.
Congratulations, you flashed your BIOS Chip via USB over an Arduino Uno.
Step 8 (Optional) – Replace your BIOS Chip
If you got errors however like I had in the first try, it is likely that your BIOS CMOS Chip is broken on a Hardware level. In this case, you have to physically desolder the CMOS Chip from the Mainboard and replace it with a new one (the same model that is).
Such a error message can look something like this:
After replacing the Chip, just jump back to Step 6 and try again.