Sunday, August 29, 2010

Openbiosprog-spi: Open Hardware and Free Software USB-based programmer for SPI chips

Random Projects

openbiosprog-spi is a fully Open Hardware and Free Software USB-based programmer for SPI chips, e.g. those used as BIOS chip in recent mainboards. 

The user-space source code is part of flashrom (GPL, version 2), the schematics and PCB layouts are licensed under the CC-BY-SA 3.0 license and were created using the open-source Kicad EDA suite (GPL, version 2).

Downloads

The schematics, PCB layouts, and other material is available from gitorious:
$ git clone git://gitorious.org/openbiosprog/openbiosprog-spi.git
 
The flashrom source code is available from:

$ svn co svn://flashrom.org/flashrom/trunk flashrom
The openbiosprog-spi 0.1 Gerber files and drill file are also available for download here (for convenience): 
http://randomprojects.org/wiki/images/a/a8/Openbiosprog-spi-0.1-gerber.zip

Design

This is intended to be a simple, fast, USB-based SPI chip programmer.
  • It uses the FTDI FT2232H chip as basis for USB as well as for handling the actual SPI protocol in hardware (MPSSE engine of the FT2232H).
  • Attaching the SPI chip:

    • There's a DIP-8 socket on the device so you can easily insert the SPI chip you want to read/erase/program.
    • Optionally, if you don't want a DIP-8 socket, you can solder in a pin-header with 8 pins, which allows you to connect the individual pins to the SPI chip via jumper wires or grippers/probes.
  • The hardware is designed using the open-source Kicad EDA suite (GPL, version 2), and is released under the CC-BY-SA 3.0 license.
  • The software on the host side is flashrom (GPL, version 2).
  • The PCB board dimensions are 44mm x 20mm.

Usage

(flashrom output partly shortened for better readability)
 
Identify the SPI chip:
 
$ flashrom -p ft2232_spi:type=2232H,port=A
Found chip "Winbond W25x80" (1024 KB, SPI) at physical address 0xfff00000.
 
Read chip contents:
 
$ time flashrom -p ft2232_spi:type=2232H,port=A -r backup.bin
Found chip "Winbond W25x80" (1024 KB, SPI) at physical address 0xfff00000.
Reading flash... done.

real    0m9.758s
user    0m0.640s
sys     0m0.432s
 
Erase chip:
 
$ time flashrom -p ft2232_spi:type=2232H,port=A -E
Found chip "Winbond W25x80" (1024 KB, SPI) at physical address 0xfff00000.
Erasing flash chip... SUCCESS.

real    0m41.785s
user    0m26.518s
sys     0m0.812s
 
Write chip (includes an automatic erase step and another read step for write success verification):
 
$ time flashrom -p ft2232_spi:type=2232H,port=A -w newimage.bin
Found chip "Winbond W25x80" (1024 KB, SPI) at physical address 0xfff00000.
Writing flash chip... Erasing flash before programming... Erasing flash chip... SUCCESS.
done.
Programming flash... done.
COMPLETE.
Verifying flash... VERIFIED.          

real    1m9.150s
user    0m26.946s
sys     0m1.788s
 
See the respective flashrom page (or consult the flashrom manpage) for details.

No comments:

Post a Comment