-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Drivers: spi: stm32: add support for DMA in asynchronous mode #73855
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
base: main
Are you sure you want to change the base?
Drivers: spi: stm32: add support for DMA in asynchronous mode #73855
Conversation
9fd0c11
to
c0049be
Compare
In the async callback if rx is NULL (ie I only want to use TX) no clean up is performed and therefore you can only send data once and it thinks the transaction is ongoing forever waiting for RX. EDIT: I realized my fix creates problems with it being asynchronous |
@777aker @ajarmouni-st is no longer contributing to this project. Don't hesitate to take his commits in your PR for contribution. Then, note that RTIO API is probably the way to go to support real async on this driver (see #67327) |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
@777aker will you finish this pull request? I'm ready to provide any possible help, but I'm kinda new into Zephyr, so I need some guidance. I really want to make this feature happen! |
d5124fd
to
a39f972
Compare
Implement async SPI with DMA. Signed-off-by: Abderrahmane Jarmouni <[email protected]>
Add STM32 async DMA testcase. Signed-off-by: Abderrahmane Jarmouni <[email protected]>
a39f972
to
8a35c28
Compare
@JarmouniA, @777aker Are you still working on this ? |
@erwango Not at the moment.
That would probably upset many users that only want DMA for higher transfer speeds, & don't care much about the asynchronous part. |
Also, I think the implementation should be reworked with this suggestion, it will make it more robust & probably much simpler.
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Adds support for DMA in asynchronous mode.
Tested on
nucleo_f767zi
&nucleo_f429zi
successfully.west build -p always -b nucleo_f429zi tests/drivers/spi/spi_loopback -T drivers.spi.stm32_spi_async_dma.loopback
drivers.spi.stm32_spi_async_dma.loopback
test case passes on stm32h573i_dk, nucleo_f207zg, nucleo_f429zi, nucleo_f746zgBut fails on nucleo_wb55rg, nucleo_wl55jc, nucleo_g474re, nucleo_h743zi