Skip to main content

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:

  1. The official firmware "has too many useless features"
  2. It is written in Rust, which the author's "eyes just cannot stand"
  3. It "handles display interaction in a weird way that breaks my brain"

Architecture​

When Sparkle starts up, it initializes three interfaces1:

  1. USB CDC interface — for debugging purposes; all messages are logged here
  2. USB HID interface — for control purposes; API requests are sent here
  3. 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 IDCommandDescription
0x00GLITTER_CMD_REBOOTReboots into BOOTSEL mode (0x00) or firmware (0x01)1
0x01GLITTER_CMD_SLEEPEnter (0x01) or exit (0x00) sleep mode1
0x02GLITTER_CMD_WAKE_ON_COMMANDToggle wake-on-command mechanism (draw commands auto-wake)1
0x03GLITTER_CMD_SET_SLEEP_TIMEOUTSet sleep timeout in ms (0 = disable, -1 = ignore all sleep requests)1
0x04GLITTER_CMD_SET_GLOBAL_BRIGHTNESSSet global LED brightness multiplier1
0x05GLITTER_CMD_DRAW_PIXELSet a single pixel (x, y, brightness)1
0x06GLITTER_CMD_DRAW_LINEDraw 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​

  1. Remove the input module(s) from the input deck
  2. Switch to BOOTSEL mode by toggling DIP-switch pin 2 to ON
  3. Place the module(s) back in the input deck — a mass storage device appears
  4. Copy the .uf2 file to the mass storage device
  5. The RP2040 flashes automatically; the file disappears when complete
  6. Remove the module(s), toggle DIP-switch pin 2 to OFF, and replace1

Technical Specifications​

SpecificationDetails
LanguageC (Pico SDK)1
TargetFramework Laptop 16 LED Matrix Input Module (RP2040)1
ProtocolGlitter Protocol v1.0 (USB HID)1
Display9×34 LED grid (306 LEDs)1
LED controllerIS31FL3741A1
InterfacesUSB CDC (debug), USB HID (control), RP2040 Reset (flashing)1
LicenseGPL-3.01
Commits311
GitHub Stars81
SourcevddCore/sparkle-fw16 (GitHub)1

Companion Project​

A reference implementation for a Sparkle-compatible driver and renderer is available at vddCore/Starlight.Framework1.

ProjectDescription
sigroot FW LED Matrix FirmwareArduino-based alternative firmware for the LED matrix
LED Matrix ControllersCross-firmware JS/TS library supporting sparkle-fw16
LED Matrix VocabJapanese vocabulary tool with firmware auto-detection
led-matrix-managerQt GUI for LED matrix management
fw16-led-matrixdCross-platform Rust daemon for the LED matrix

Footnotes​

  1. vddCore/sparkle-fw16 — GitHub (README, Glitter Protocol documentation, build instructions) ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15 ↩16 ↩17 ↩18 ↩19 ↩20 ↩21 ↩22 ↩23 ↩24 ↩25 ↩26 ↩27 ↩28 ↩29 ↩30 ↩31 ↩32 ↩33