-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change DMA2 to DMA1 for FSMC TFT on STM32F1xx #27385
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhapsodyv — Is there any reason you can think of that we should not do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing defaults are always prone to break someone’s setup…
And if you take a look in the history, you will see that it’s no the first time this same line change between dma channels.
In this case, I think the best would add to the board pin file the right dma to use, or at least allow it be overwritten by the env build flags… so Marlin doesn’t need to back and forth changing dma channels in the code each time it doesn’t work for someone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comments!
It's definitely possible that this could break something for someone, so this change is definitely a tenuous one that we want to keep an eye on. Most advice I found in searches pointed to using a slightly higher priority for SDIO or a slightly lower priority for FSMC. If we haven't gotten any definitive feedback about this change before 2.1.3-beta1 is ready, I'll mark it as an important bullet point for testers.
For testing purposes it would be best to get feedback from those who were definitely affected by the DMA contention issue, but I do have a small pile of STM32-based boards, a few with FSMC, and some are inside printers. If I have one of the specifically affected boards or printers I can also try to make SDIO break and see what happens when priorities are adjusted.
Some boards do specify
FSMC_DMA_DEV
andFSMC_DMA_CHANNEL
. (For example Mingda D2 hasDMA1
andDMA_CH4
) but these only seem to apply to our deprecated Maple environments. For others the DMA is based on the HAL, but that follows from the ports and interrupts specified by the boards/variants.So, I'll have to do a board-by-board audit to see which DMA they use. I should also make a big Google spreadsheet with all our board information laid out for easy reference. (I'll ask an LLM to help with that.) Most boards are based on a generic STM32 layout but we can look at each one and make sure that the DMA we've picked is correct, and if there is a need to add overrides on a per-board basis we'll also add that capability. I hope we can automatically figure out most of these things on the users' behalf from things like pins and header defines so they don't have to think about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll gather our board / environment info in this here spreadsheet…. A single board may have more than one environment with different DMA settings, and that's what we'll discover from populating this sheet.
https://docs.google.com/spreadsheets/d/10Wsch_IduVArjNApnnBtpQlc1-TRjwyaRo6-FanhCYI/edit?usp=sharing