sparkle-fw16
sparkle-fw16 is an alternate firmware for the Framework Laptop 16 LED Matrix Input Module, written in C using the RP2040 Pico SDK1. Developed by vddCore, it was created as a leaner alternative to the official FrameworkComputer/inputmodule-rs firmware, which the author found had "too many useless features" and was written in Rust, a language they disliked1.
The firmware implements the custom Glitter Protocol over USB HID, providing device info reports, basic commands (reboot, sleep/wake, brightness, draw pixel/line), and full grid PWM and DC scale control1. A companion reference driver/renderer is available at vddCore/Starlight.Framework1.
Motivation
The author's stated reasons for creating an alternative firmware were1:
- The official firmware "has too many useless features"
- It is written in Rust, which the author's "eyes just cannot stand"
- It "handles display interaction in a weird way that breaks my brain"
Architecture
When Sparkle starts up, it initializes three interfaces1:
- USB CDC interface — for debugging purposes; all messages are logged here
- USB HID interface — for control purposes; API requests are sent here
- RP2040 Reset interface — for easy flashing; the modified Sparkle Picotool makes use of this
Glitter Protocol v1.0
The Glitter Protocol is how Sparkle communicates with the host over USB HID, exposing 4 HID reports1:
Feature Report 0x01 — GLITTER_DEVICE_INFO
Returns current device information including sleep pin state, DIP switch state, INTB pin state, state flags, IS31FL3741A register values, global brightness, display dimensions (9×34 for the official module), and firmware version1. This report only accepts GET_REPORT control transfers1.
Feature Report 0x02 — GLITTER_BASIC_CMD
Executes user-accessible firmware subroutines. The first byte specifies the command ID; subsequent bytes are arguments. Padded to exactly 16 bytes1.
| Command ID | Command | Description |
|---|---|---|
| 0x00 | GLITTER_CMD_REBOOT | Reboots into BOOTSEL mode (0x00) or firmware (0x01)1 |
| 0x01 | GLITTER_CMD_SLEEP | Enter (0x01) or exit (0x00) sleep mode1 |
| 0x02 | GLITTER_CMD_WAKE_ON_COMMAND | Toggle wake-on-command mechanism (draw commands auto-wake)1 |
| 0x03 | GLITTER_CMD_SET_SLEEP_TIMEOUT | Set sleep timeout in ms (0 = disable, -1 = ignore all sleep requests)1 |
| 0x04 | GLITTER_CMD_SET_GLOBAL_BRIGHTNESS | Set global LED brightness multiplier1 |
| 0x05 | GLITTER_CMD_DRAW_PIXEL | Set a single pixel (x, y, brightness)1 |
| 0x06 | GLITTER_CMD_DRAW_LINE | Draw a line between two coordinate pairs1 |
Feature Report 0x03 — GLITTER_GRID_PWM_CNTL
Takes 306 bytes representing the entire pixel grid's brightness values (9×34 = 306 LEDs)1. Ignored if wake-on-command is disabled1.
Feature Report 0x04 — GLITTER_GRID_DC_SCALE_CNTL
Takes 306 bytes representing DC scale values for every pixel. These correspond to the IS31FL3741A LED controller's current scaling registers, as documented in the included IS31FL3741A datasheet1.
Installation
Building
cmake . -B build/ -G ninja -DCMAKE_BUILD_TYPE=<build_type>
cd build/
ninja
Where <build_type> is Release, RelWithDebInfo, or Debug. Requires RP2040 Pico SDK with PICO_SDK_PATH and PICO_TOOLCHAIN_PATH environment variables set1.
Flashing
- Remove the input module(s) from the input deck
- Switch to BOOTSEL mode by toggling DIP-switch pin 2 to ON
- Place the module(s) back in the input deck — a mass storage device appears
- Copy the
.uf2file to the mass storage device - The RP2040 flashes automatically; the file disappears when complete
- Remove the module(s), toggle DIP-switch pin 2 to OFF, and replace1
Technical Specifications
| Specification | Details |
|---|---|
| Language | C (Pico SDK)1 |
| Target | Framework Laptop 16 LED Matrix Input Module (RP2040)1 |
| Protocol | Glitter Protocol v1.0 (USB HID)1 |
| Display | 9×34 LED grid (306 LEDs)1 |
| LED controller | IS31FL3741A1 |
| Interfaces | USB CDC (debug), USB HID (control), RP2040 Reset (flashing)1 |
| License | GPL-3.01 |
| Commits | 311 |
| GitHub Stars | 81 |
| Source | vddCore/sparkle-fw16 (GitHub)1 |
Companion Project
A reference implementation for a Sparkle-compatible driver and renderer is available at vddCore/Starlight.Framework1.
Related Projects
| Project | Description |
|---|---|
| sigroot FW LED Matrix Firmware | Arduino-based alternative firmware for the LED matrix |
| LED Matrix Controllers | Cross-firmware JS/TS library supporting sparkle-fw16 |
| LED Matrix Vocab | Japanese vocabulary tool with firmware auto-detection |
| led-matrix-manager | Qt GUI for LED matrix management |
| fw16-led-matrixd | Cross-platform Rust daemon for the LED matrix |