SPI Flasher turns a Raspberry Pi into a browser-controlled flash-chip programmer

Raspberry Pi, SPI, flash

This is the read-only HTML version. For the full Visual Space experience, open the app.

Raspberry Pi, DIP8 adapter — I

Raspberry Pi, DIP8 adapter — I

Source: SPI Flasher on Hackaday.io · Yann Guidon / YGDES

Networked chip programming

A socket adapter supplies the hardware; a C program and web interface do the heavier lifting. Yann Guidon’s SPI Flasher demonstrates a network-accessible programming tool—and the maintenance challenge of separating working software from the larger system it grew inside.

❤️ 1

A flash-chip programmer doesn’t have to sit at the end of a USB cable. Yann Guidon / YGDES’s SPI Flasher on Hackaday.io uses a Raspberry Pi, a small socket adapter and a web interface to read and program serial memory chips over the network. Created in September 2015, the project puts most of its complexity in software rather than the adapter—and its dated development notes show why that choice matters.

Guidon developed the tool to support YASEP and related free-hardware projects. The goal was a low-cost, compact programmer that could run from a battery and be accessed from another computer without installing a dedicated programmer driver. He reports using his own setup outdoors without mains power, but the more broadly useful idea is simpler: the Pi stays beside the chip, while the operator can work elsewhere on the network.

A socket, a capacitor and a defined set of chips

The listed hardware starts with a Raspberry Pi B or B+, prototyping board, a DIP-8 socket or suitable alternative, and a 100 nF ceramic capacitor. The adapter connects the Pi’s expansion header to the memory chip; it isn’t a universal programmer with a long list of voltage options.

The documented limits are important: 3.3 V chips, 24-bit addressing and capacities from 128 KB to 16 MB. Guidon lists the 25LC1024, M25P40, A25L40P, AT26DF321, W25Q32BV, W25Q64 and W25Q128F as parts he validated. That is a specific compatibility list, not a promise that every eight-pin serial memory will work.

His September 22, 2015 log on adding the Winbond 25Q32 shows the checks behind an addition. He compared its supply range, pinout, 256-byte programming pages, read-clock limit and erase commands against an already supported part before updating the chip-definition header. For the physical test adapter, he soldered the SOIC chip onto a DIP-compatible board and placed the capacitor close to its power pins.

The useful lesson is that matching the socket is only the beginning. The software also needs to know how a particular chip accepts writes and erases.

One C program serves the terminal and the browser

The flashing tool is written in C for Linux, with Raspberry Pi-specific GPIO and SPI routines at the bottom. It can run from the command line or as a CGI program under Apache, integrated into Guidon’s YGWM web interface. That arrangement gives the browser access to the same underlying programming tool rather than requiring a separate desktop application.

Its native data format is HYX. Instead of putting every import and export format into the C program, Guidon supplied Unix filters for raw binary and JSON, with additional transformation possibilities through the JavaScript-based interface. It’s a useful separation: chip access remains in one program, while data conversion can happen outside it.

There is a storage tradeoff. In a January 19, 2016 note, Guidon said that representing a 16 MB chip could require 32 or 48 MB in HYX. Transparent gzip support through Zlib was proposed, not reported as implemented. His interim workflow was to decompress a binary file, convert it to HYX and pipe the result into the programmer.

Guidon also describes the programming algorithm as designed to reduce wear. A December 3, 2015 comparison provides a concrete performance observation: his Pi setup completed a 16 MB all-zero programming test in about 2 minutes 41 seconds, while his TL866 USB programmer took 7 minutes 23 seconds for the same task. Those are his reported timings for that setup, not a general benchmark of all programmers.

He also reported that the TL866 flagged failures on some W25Q128 chips that the Pi tool subsequently found correctly written. The notes leave the cause unresolved, so the timing result is firmer ground than a broad claim of superior accuracy.

The adapter was easier to preserve than the software stack

By April 15, 2016, Guidon described a working system at home on a Pi model B, but one tied to an older YASEP interface and his custom Raspbian-derived environment. Turning it into a standalone package meant untangling those dependencies, maintaining the operating-system image and updating direct hardware access for newer Pis.

The dates help separate working hardware from intentions. The original component list names the B and B+ and marks Pi 2 support as planned. A May 1, 2017 note in the project details says rebuilding had begun around GPIO and SPI libraries, with Pi 2/3 support reported for the GPIO library, while restoring the whole stack remained work ahead. That is progress toward compatibility, not confirmation of a finished Pi 2/3 flasher package.

SPI Flasher’s lasting lesson is the split between a small electrical interface and a much larger software appliance. Moving control into a browser can remove a desktop-driver burden, but it moves maintenance onto the device hosting the service. For anyone revisiting this design, the first milestone should be a repeatable command-line read, write and verification path on the chosen Pi and chip; the browser interface becomes much easier to preserve once that foundation stands on its own.

Source: SPI Flasher

Hardware

3 Followers

A workshop for electronics and physical computing. Share circuits, boards, tools and prototypes; work through measurement and debugging, compare components, and document the choices that turn an idea into working hardware.

Visual Space is built for projects like this—where creators collaborate, organize goals, and grow communities around real work.