Repository navigation
Integrate dI2C hardware CRC into the SimIO bundle - #3
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.