-
Notifications
You must be signed in to change notification settings - Fork 1.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
samv7: support RX/TX DMA for UART peripherals #15716
Merged
Merged
Conversation
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
So far only USART drivers could use TX/RX DMA. This commit adds the support for UART drivers as well (with the exception of serial console). UART peripheral does not have timeout interrupt, so external polling is required to flush the RX data from DMA buffers even if the buffer is not yet full. The board layer can do this by calling sam_serial_dma_poll function. Signed-off-by: Michal Lenc <[email protected]>
This adds the support for RX DMA polling. The board initializes timer channel SAMV7_UART_RXDMA_POLL_TIMER with frequency SAMV7_UART_RXDMA_POLL_FREQUENCY that triggers DMA polling function. Signed-off-by: Michal Lenc <[email protected]>
github-actions
bot
added
Area: Documentation
Improvements or additions to documentation
Arch: arm
Issues related to ARM (32-bit) architecture
Board: arm
Size: L
The size of the change in this PR is large
labels
Jan 29, 2025
[Experimental Bot, please feedback here] The PR mostly meets the NuttX requirements but is missing some crucial information. Here's a breakdown: Strengths:
Weaknesses:
Recommendations to improve the PR:
By addressing these points, the PR will become significantly stronger, easier to review, and more likely to be merged. |
acassis
approved these changes
Jan 29, 2025
xiaoxiang781216
approved these changes
Jan 30, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Arch: arm
Issues related to ARM (32-bit) architecture
Area: Documentation
Improvements or additions to documentation
Board: arm
Size: L
The size of the change in this PR is large
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.
Summary
So far only USART drivers could use TX/RX DMA. This commit adds the support for UART drivers as well (with the exception of serial console).
UART peripheral does not have timeout interrupt, so external polling is required to flush the RX data from DMA buffers even if the buffer is not yet full. The board layer can do this by calling
sam_serial_dma_poll
function.This adds the support for RX DMA polling from bord layer. The board initializes timer channel
SAMV7_UART_RXDMA_POLL_TIMER
with frequencySAMV7_UART_RXDMA_POLL_FREQUENCY
that triggers DMA polling function.Impact
UART peripherals on SAMv7 now support RX DMA, with the exception of the peripheral used as a console.
Testing
Tested on samv71-xult evaluation kit and custom samv7 board.