Repository navigation
Conversation
Configure CRC16 or CRC32 for an allocated DMA channel, preserve interrupt state, and release ownership after completion or abort.
crabel99
added a commit
to crabel99/SimIOFramework
that referenced
this pull request
Oct 1, 2026
Apply CRC source commit a9e6e44 from adafruit#398. Local 12-board CI matrix, 35 native CTests, and 10 RedBoard DMA hardware checks pass. SAME54 hardware validation remains pending.
This was referenced Oct 5, 2026
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.
Expose the SAMD DMAC CRC engine without making consumers program CRC registers or arbitrate shared ownership. The DMA owner retains descriptors, scheduling and completion callbacks.
This PR adds only
cores/arduino/DmacCrc.hand.cpp. Channel mode observes an allocated DMA channel. Input mode feeds the same hardware through CRCDATAIN when a transfer uses interrupt-driven bytes, and enables its clock without allocating a DMA channel. Both modes share ownership, reject competing callers, preserve interrupt state, and release after abort without publishing a partial checksum. Persistent owner/source state is two bytes; there is no heap or payload allocation.CRC-16 and CRC-32 accept explicit seeds. D21, D51 and SAME53/54 register layouts are covered. The module does not append or verify wire trailers; optional Wire integration is in #395.
Validation:
The standalone D21 input-mode CRC16 vector has not been run physically. D21 DMA CRC16 and dI2C input-mode CRC32 have been verified.
Base: upstream master e914db6. The narrow branch contains none of the integration bundle's other changes.
All 12 local Arduino CI configurations pass on exact branch commit
5d6fd59d92e40aba6891a1d7d9b71135c51d47cc, including TinyUSB builds using that branch's own pinned library. Earlier interrupted/overridden-library runs remain recorded separately.