Skip to content

G0: add the shared SPI protocol and pipelined link - #865

Open
dynfer wants to merge 2 commits into
FOME-Tech:masterfrom
dynfer:codex/g0-v9-01-protocol
Open

dynfer wants to merge 2 commits into
FOME-Tech:masterfrom
dynfer:codex/g0-v9-01-protocol

Conversation

@dynfer

@dynfer dynfer commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Introduce the common communication layer for the STM32G071 expansion. The slave returns the previous request’s response, so the link tracks the pending request and validates each reply before delivering it to a module.

Protocol 9 uses fixed 36-byte frames with CRC16/CCITT-FALSE. Response checks cover command, payload size, status, channel and protocol compatibility. Startup and reconnect discard the old pipeline, stalled replies invalidate module state, and round-robin scheduling prevents continuously changing outputs from starving sensor reads.

The wire contract and link remain independent of ChibiOS, allowing their behavior to be tested on the host.

Validation: standalone tests passed with AddressSanitizer and UndefinedBehaviorSanitizer, covering corruption, pipelining, reconnect, version mismatch, scheduling, idle modules and stalled responses.

@dynfer dynfer changed the title Add CRC-protected protocol with pipelined link support G0: add the shared SPI protocol and pipelined link Nov 14, 2026
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