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 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.
Why
Expose the SAMD DMAC CRC engine without making each DMA consumer program its registers or arbitrate ownership.
DmacCrcobserves a channel whose owner retains the descriptors and transfer callbacks.Scope
Adds
cores/arduino/DmacCrc.hand.cpponly.begin()selects CRC-16 or CRC-32 with an explicit seed before a DMA channel starts.finish()returns the hardware checksum after successful completion, or releases ownership after abort without publishing a partial checksum. Competing requests returnBusy. Register access preserves interrupt state and the D21 channel selector.The module supports the D21, D51 and SAME53/54 register layouts. It uses one byte of persistent state and no heap allocation or payload buffer. It does not automatically append or verify a SERCOM wire trailer.
Verification
The exact CRC source files were tested in the integrated Framework checkout:
tools/build_all.py: all 12 workflow configurations passed in the integrated checkout, including both TinyUSB configurations.Known-vector results were CRC32
CBF43926, CRC16 seed FFFF29B1, and CRC16 seed zero31C3for123456789. A 255-byte patterned transfer produced6626D95Dboth contiguously and through linked 127-byte/128-byte descriptors.Base: upstream
masterate914db61e1ab88c7f0fbf4827f8329389a4cc8d5. The PR contains none of the integration bundle's other changes.