Skip to content

Integrate dI2C hardware CRC into the SimIO bundle - #3

Merged
crabel99 merged 2 commits into
simio-local-bundlefrom
feature/di2c-crc-bundle
Oct 5, 2026
Merged

crabel99 merged 2 commits into
simio-local-bundlefrom
feature/di2c-crc-bundle

Conversation

@crabel99

@crabel99 crabel99 commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Enable opt-in CRC-32 for dI2C while preserving all 255 data bytes and adding a separate four-byte trailer. Wire leaves CRC disabled by default, so internal I2C and SPI behavior is unchanged. SERCOM owns hardware CRC acquisition, DMA/byte-path selection and completion; failed receives expose no payload bytes.

The integration includes input-register support for interrupt-driven transfers and corrects full-buffer receive retirement before a following repeated START. The retirement regression failed natively before the guards and passed afterward; the original paired hardware reproduction also passed after correction.

Validation includes all 43 Framework native cases, the paired 106-case corruption/truncation matrix in both directions, full 255-byte repeated-START transfers, NACK recovery, and 100 iterations of the earlier stall reproduction. Device register writes and signed firmware transfers separately verified rejection before side effects. Full inactive-slot readbacks prove seven rejected pages and a valid-page replay leave flash unchanged. E54 concurrent DMA matched an independent CRC reference with an unrelated channel still active.

The prior local tooling/research commit is included because the remote bundle had not yet received it. Reusable CRC and asynchronous SERCOM changes also advance their existing upstream PRs adafruit#398 and adafruit#395; the bundle is the Device dependency, not a replacement upstream PR.

Related: crabel99/SimIODevice#86, crabel99/SimIODevice#44, crabel99/SimIOProtocol#12. General command deduplication remains under crabel99/SimIODevice#87 by explicit user decision.

Exact bundle commit 629177a passed all 12 local Arduino CI board configurations, including both TinyUSB configurations, before push.

@crabel99
crabel99 merged commit 629177a into simio-local-bundle Oct 5, 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