PC Bios flash memory programming

Introduction

This page is an hardware and software extension of pgrm3 Micro & Eprom Programmer : programmer side and present a quick way to program flash memory devices used to contains the BIOS program of a PC memory board.

This extension communicate with pgrm on the host system through a serial line running at 115200 bits/s, and uses all the common functions of this programming system.

Motivation

I was trying to repair A8N5X mother board that suddenly failed to work with a long beep and 2 short beeps a few days ago. This beep pattern code means, in my case, a failure to access the video board. The video board and the ram, tested on another PC, were working correctly. The different supllies, comprising the North bridge supply, on the mother board were present and looked to be correct.

As I experienced failures of memory flash in microcontroller Avr and PIC from time to time that were always repaired by reflashing, I suspected the bios program and tried to reprogram it. The MB manufacturer provides tools to program the flash, but these tools require a full functionnal bios able to go through the POST.

A solution to this is to remove the flash merory and to program it or on another working PC by doing a hot swap of device or on a programmer. I have the programmer but not the connection to the device, so I build it.

Hardware

In the principle, The hardware only consists of an avr atmega644 microprocessor wired to a 32 pins PLCC socket. The microprocessor is connected to the PC with a serial line and rs232 adaptor and working at 115200 bits/s. A crystal driven processor is needed to work at this rate.

The carrying out is a little bit more complicated: the PLCC socket is first converted to a standard dual in line eprom connector and processor ports are directly wired to this connector.

Please note: the flash requires to work at power supply of 3.3 volts. So the processor and the rs232 adaptor is supplied with 3.3 volts.

Here is the schematics of the adaptor and a picture of it. Yes I see your remark: the PLCC socket is a bigger one, splitted in diagonal and reduced to get the required number of contacts.

Adaptor picture

Software

The software is a specific driver for 49lf000x devices embedded in the pgrm3 software. Addreses are presented in multiplexed mode to the device, A0-A10 on the falling edge of the R/C signal and A11-Ax on the rising edge. Datas are sent on the rising edge of the WE signal and read on the the rising edge of the OE signal. These devices can be used in 2 modes: LPC and PP, see datasheet for information on these modes. The programmer use only the PP mode by setting the MODE signal to level 1.

All source files, except the Makefile, are common to pgrm3 files and on my system, I make symbolic links to them. But because a compilation switch, the resulting objects and binary are different. That is the reason for using a different directory.

Compiling the firmware

You need to have the tools installed, and next run the following commands.

tar zxvf pg49lf-yyyymmdd.tar.gz
cd pg49lf-yyyymmdd
make

Program the flash of the processor with the generated firmware.

The actual size of the Program is 0x2A50 bytes, that means it can be used in a atmega164 or another processor of the serie. If you change the processor, remember that you need to change the bootloader address in the Makefile.

References

  1. 1 - GCC, the GNU Compiler Collection .
  2. 2 - AVR Libc Home Page.
  3. 3 - gEDA Project Homepage.
  4. 4 - host part of the programming system.
  5. 5 - A bootloader program.
  6. 6 - Micro & Eprom Programmer pgrm3 : programmer side.
  7. 7 - Rs232 serial adaptor.

License

The Pg49lf software is licensed under the terms of the GNU General Public License as published by the Free Software Foundation. See the file "COPYING" in the "pg49lf" directory.

Conclusions

Reflashing the device did not solve my initial problem. At least it removed the probability of a flash failure and invited me to proceed with further investigations. Finally I removed the chipset fan, removed the thermal paste that was in excess and dry and when measuring voltage on elements under the fan, cpu fan changed noise and video started to work. So I suppose a solder failure and I redo it. I did not need to change the supply transistor as shown on this page or to cook my MB at 200°C in an owen like shown on this video.

Programming the flash is a low process and takes a few minutes. So the solution is not suitable for an industrial use, but can help for a time to time and a cheap need.

Download