-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
drivers: dma: stm32 dmamux device is passed to the dma device #30041
Conversation
af1d2a8
to
ea8790b
Compare
testing tests/drivers/dma/loop_transfer on nucleo_wb55rg:
|
tests/drivers/dma/chan_blen_transfer/boards/nucleo_l476rg.overlay
Outdated
Show resolved
Hide resolved
tests/drivers/dma/chan_blen_transfer/boards/nucleo_wb55rg.overlay
Outdated
Show resolved
Hide resolved
9718f99
to
ed3ef43
Compare
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.
Please clear CONFIG_DMA_MCUX_TEST_SLOT_START from the commit messages.
One copyright remains to be fixed.
Otherwise LGTM
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.
LGTM
this PR must be reworked as the tests/drivers/spi/spi_loopback now fails:
|
@FRASTM please let us know when everything is fine |
It adds flexibility to test different dma channels The chan_blen_transfer is modified like the loop_transfer application to support stm32xx devices with dma and/or dmamux. On the stm32 devices, the first dma channel is 1. Signed-off-by: Francois Ramu <[email protected]>
The dma test applications for MEM-to-MEM transfers are modified to run on the stm32wb55 with a DMAMUX loop_transfer on any CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR from 0 to 13 chan_blen_trasnfer on CONFIG_DMA_TRANSFER_CHANNEL_NR_0 from 0 to 13 and on CONFIG_DMA_TRANSFER_CHANNEL_NR_1 from 0 to 13 Signed-off-by: Francois Ramu <[email protected]>
The dma test applications for MEM-to-MEM transfers are modified to run on the stm32l476 with a DMA. The CONFIG_DMA_LOOP_TRANSFER_DRV_NAME is either DMA_1 or DMA_2 CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR from 1 to 7 for DMA_1 CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR from 1 to 5 for DMA_2 Signed-off-by: Francois Ramu <[email protected]>
With this fix, only the tests/drivers/dma applications are modified to include the support of the DMAMUX on some stm32 devices (typ. stm32wb55rg). In this case, the callback function ( |
with this fix and connecting SPI 1 MISO to MOSI (PA7 = PA6 on CN10 of the nucleo_wb55rg board)
|
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.
LGTM, but please add "dma" support in board yaml files, so this can be tested in CI.
This will add the corresponding tests/drivers/dma/ tests to the sanity check Signed-off-by: Francois Ramu <[email protected]>
The dmamux device reference is passed to the associated dma device during the dmamux_stm32_configure()
through the user_data field of the dma_config structure.
So that, later on the incoming dma irq, the dma knows the dmamux where to route its callback function
This is demonstrated using the
tests/drivers/dma/loop_transfer
andtests/drivers/dma/chan_blen_transfer
running on the stm32wb55 nucleo board.fixes #29992