How to turn a spare RP2040 microcontroller and a SOIC-8 test clip into a fast, reliable *flashrom* programmer for extracting embedded BIOS images.
Pinout & Wiring
Most 8-pin SPI NOR flash chips (W25Q64, W25Q128, MX25L) operate at 3.3V (or 1.8V on newer mobile chipsets) and follow a standard SOIC-8 footprint:
| SOIC-8 Pin | Signal | RP2040 GPIO | Description |
|---|---|---|---|
| Pin 1 | /CS | GP17 | Chip Select (Active Low) |
| Pin 2 | DO (MISO) | GP16 | Serial Data Out |
| Pin 5 | DI (MOSI) | GP19 | Serial Data In |
| Pin 6 | CLK | GP18 | Serial Clock |
| Pin 8 | VCC | 3V3(OUT) | 3.3V Supply (Check datasheet first!) |
WARNING
Verify whether your target SPI flash is a 1.8V (W25Q64JW) or 3.3V (W25Q64JV) part before connecting VCC—driving a 1.8V flash chip directly from a 3.3V rail without a level shifter can permanently damage the controller.
Dumping and Verifying With flashrom
Always take at least two consecutive reads and compare their SHA-256 checksums to ensure your SOIC-8 clip made solid contact:
bash
# Read two separate dumps over serprog
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r dump1.bin
flashrom -p serprog:dev=/dev/ttyACM0:115200 -r dump2.bin
# Verify bit-for-bit identical dumps
sha256sum dump1.bin dump2.bin