Dump EEPROM

From RECESSIM, A Reverse Engineering Community
Jump to navigation Jump to search

A serial EEPROM is a small IC that stores data in a physically compact package. These are often used in electronic equipment and it's useful to dump the contents of such devices to do a thorough job of reverse engineering.

Using a Raspberry Pi

Because many of these devices are 3.3V parts, it's often possible to dump the contents of such devices using nothing more than a Raspberry Pi, some micrograbbers and jumpers. As an example of this, we'll show the steps involved in using a Raspberry Pi Zero W to read the contents of the EEPROM in a L+G meter board.

Identify the device

The EEPROM in the L+G Focus meter is an Atmel (formerly Adesto) 45DB081D, which is an 8-megabit flash memory that has a SPI bus interface. Since this part can be powered by 3.3V and the Raspberry Pi already has a SPI bus, all that's required is to connect the two.

Here is one way to do that:

Function EEPROM pin # Pi pin #
MOSI 1 19
SCLK 2 23
#RESET 3 VCC
#CS 4 24
#WP 5 VCC
VCC 6 17
GND 7 25
MISO 8 21


Double check your wiring before powering up the Raspberry Pi! Failure do so can permanently damage either the Pi, your Pi power supply, the device to which you're connecting or all three.

One additional connection is needed, which is to connect the microprocessor's #RESET line to a logic low to keep the processor in reset so that it does not interfere with the Pi reading the memory.

Software

Once this is all done reading the EEPROM is as simple as executing this command on the Pi:

flashrom --read dump.bin -p linux_spi:dev=/dev/spidev0.0,spispeed=10000

The speed is specified in kHz, so this corresponds to 50MHz.