Motherboard SPI bios recovery

I’ve recently upgraded my media box PC to a new funky shiny one. During the course of this, I upgraded the BIOS on the new motherboard, and it decided to fail halfway through. Result: Brick!!

However, I didn’t let that stop me. The manual described a special “debug port” on the BIOS. Closer examination revealed it was actually an interface port to an SPI bus. Right next to it, there was a tiny 8 pin chip (a Macronix MXL25L3205D) . This turned out to be a 4Mbyte SPI flash chip: the BIOS chip itself. Many modern motherboards use these.

So: I knew the chip, and I knew the protocol used to address it. Now I needed an interface. Luckily, I bought a Microchip PicKit 2 really cheaply a month or so ago. This is a device specifically for programming Microchip PIC devices, and not random SPI flash devices. However, the firmware is open source, and actually implements a virtual machine with all sorts of useful routines including an SPI protocol implementation.

As it wasn’t directly suited for my needs, I spent a couple of days reading the PicKit2 firmware source, and figuring out how to control it. Then I wrote my own PicKit 2 interface library in python. A day fiddling later, and I had a full python based SPI programming library written, and had reflashed the chip. Its now working properly again, and I have an extremely useful multipurpose reprogramming device!

Anyway, here are some pics of the process.

The BIOS chip itself: . Note the wirewrap wires I had to use for repairs; I went down the wrong track for a while and damaged one of the traces on the board, necessitating repair.

Here’s a zoomed out shot showing my hacked together debug interface (from a cable rescued from an old monitor): .

My development area: (horrible analogue soldering and fiddly area on the left, nice clean digital software control on the right).

The motherboard itself: . The motherboard is at the bottom in this picture, the PC at the top is just providing a power supply; the pickit can supply a limited amount of power, but not nearly enough to power a complete motherboard! The PicKit is the wee black rectangle with all the wires coming out of it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: