Repository navigation
Allow DMA request zero for peripheral transfers - #5
Merged
Merged
Conversation
JaxCalder
force-pushed
the
fix/stm32-dma-channel-zero
branch
from
October 9, 2026 04:13
a94c581 to
56d5c6b
Compare
JohnAmadis
approved these changes
Oct 9, 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.
Change
validate_transfer_config()now accepts request selector0for peripheral DMA transfers. On STM32F4/F7, the existing port maps that value to hardware DMA channel 0 (CHSEL=0). The old core validation rejected it before the port could see it. For memory-to-memory transfers,DMDMA_REQUEST_NONEremains required; the transfer direction determines the meaning of zero. This changes no API or ABI.The STM32 port also continues to map legacy request
8to channel 0, so modules built against dmdma 0.5 continue working. Documentation now states both encodings. The unuseddmdma_stm32_channel_request()helper and the proposed port range check are absent from the final diff.Validation
dmdma,dmdma_port,dmdma_test_leaseanddmdma_test_portfor STM32F7.dmdma/dmdma_port0.5.1, installed both.dmfand.dmfcinto a cleandmod-bootpackage, rebuilt and flashed STM32F746G-DISCO.dmsaibuild withrequest=0for SAI1 and randmsai_port_board_testover UART. SAI1 and SAI2 passed at 48 kHz and 44.1 kHz, DMA counters advanced, and transfer errors stayed zero. There was no core-EINVALrejection. The current dmsai PR #4 still uses legacy request8for compatibility with published dmdma 0.5.