-
Notifications
You must be signed in to change notification settings - Fork 92
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
fix(PeriphDrivers): Resolve incorrect DMA request in DMA-based SPI transactions for all parts #1059
Merged
Jake-Carter
merged 6 commits into
analogdevicesinc:main
from
JeonChangmin:fix/spi-full-duplex-dma
Jul 2, 2024
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3c2e57e
fix(PeriphDrivers): always pass valid reqselTx/Rx to MXC_SPI_RevA1_Ma…
JeonChangmin 5fbbe46
fix(PeriphDrivers): always pass valid reqselTx/Rx to MXC_SPI_RevA1_Sl…
JeonChangmin 0680d6b
refactor(PeriphDrivers): merge reqselTx/Rx setting in MXC_SPI_MasterT…
JeonChangmin 4674b6f
refactor(PeriphDrivers): merge reqselTx/Rx setting in MXC_SPI_RevA1_S…
JeonChangmin 049b11e
fix(PeriphDrivers): fix wrong reqselTx/Rx assigment in DMA-based SPI …
JeonChangmin 6bcc398
fix(PeriphDrivers): fix wrong spi_num - reqselTx/Rx match in DMA-base…
JeonChangmin 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
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.
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.
AI87 implementation has SPI0/SPI1 swapped as well. Should be
reqselTx = MXC_DMA_REQUEST_SPI0TX;
here.Not your fault, this was there before your fix.
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.
I believe the original implementation was correct. SPI0 and SPI1 are swapped in several places as an unfortunate result of incorrect documentation, and it's been stuck like that ever since to prevent breaking projects... It's why we have messes like this for the ME17, AI85, and AI87.
I say we fix this even if it might break existing projects. Usually, instance 0 is mapped to the lowest peripheral address, and then everything goes in ascending order:
However, the ME17, AI85, and AI87 doesn't follow this:
This has caused confusion, but it'll be a major breaking change to swap the SPI instance names. Instead, we can fix the
MXC_SPI_GET_*
definitions in the {device}.h file where SPI0 would be associated with index 0, and SPI1 with index 1. This would still be a breaking change, but it would at least help keep all the indexing aligned with the correct SPI names.What do you think? @Jake-Carter & @lorne-maxim