Skip to content

Implement STM32 flashing for Laptop 12 2nd Gen Input Deck - #395

Merged
JohnAZoidberg merged 1 commit into
mainfrom
stm32-kbd-flash
Nov 18, 2026
Merged

JohnAZoidberg merged 1 commit into
mainfrom
stm32-kbd-flash

Conversation

@JohnAZoidberg

Copy link
Copy Markdown
Member

No description provided.

@JohnAZoidberg
JohnAZoidberg requested a review from TapFW November 18, 2026 07:05
Port of stm32kbd_tool's stm32bl.c and deck.c: read firmware version,
hardware info and flags through the vendor protocol on the deck's
I2C-HID interface, and flash, erase and identify the controller by
running the STM32 ROM bootloader protocol (AN4221) over I2C passthrough.
The EC only enters and exits the bootloader.

Usable as a library: nothing is printed, long operations report
progress through a callback that can cancel, and errors carry a kind
(comms, verify, refused, bad image, ...). The bootloader is always
exited, also on error.

Keeps the reference's recovery: a write whose result is unknown is
checked by reading the flash back, and a page that doesn't take is
erased and rewritten.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
@JohnAZoidberg
JohnAZoidberg enabled auto-merge (rebase) November 18, 2026 07:15
@JohnAZoidberg
JohnAZoidberg merged commit 583bbbe into main Nov 18, 2026
10 of 11 checks passed
@JohnAZoidberg
JohnAZoidberg deleted the stm32-kbd-flash branch November 18, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant