-
Notifications
You must be signed in to change notification settings - Fork 1k
SPI DMA enhanced transfers #1285
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
Comments
oops, not that simple, even the 'SPI api' there are subtle differences between libmaple and official core and original Arduino implementations. so no hurry really. it'd take time to update my codes as well. |
Hi @ag88 |
Hi, you still can use dma using STM32 HAL api with this core |
hi thanks, i need to pickup skills on hal and would likely implement a 'trial' fork of spi.h and spi.cpp |
consider this similar to #1035 |
Is your feature request/improvement related to a problem? Please describe.
current standard Arduino SPI api doesn't do DMA.
However it is a strong feature on STM32 mcus.
DMA accelerated transfers are particular useful for e.g. LCDs
Describe the solution you'd like
libmaple (roger's) has some additional API calls that are DMA specific
e.g. the dmatransfer() and dmasend() functions
i'm not too sure if it is a good idea to mirror those DMA APIs across into STM core.
or perhaps they could be implemented in existing enhanced transfer() methods.
hence, i'd leave that decision to you
Describe alternatives you've considered
i happened to be making an 'optimized' ILI9341 lcd 'library', not really but more like a 'cleaned up' Adafruit_ILI9341_STM from Roger's core. i think i'd try to make it work in 'both cores'. In Roger's core i'm using the dmaSend() call for the accelerated pixel push. for ST's core i'd use the bulk buffer enhanced transfer() functions. i'd use/change to the 'DMA accelerated' ones as they become available. for now mainly F401 and maybe F103, it probably is difficult to do 'across the board', at least too much to test and maybe some doesn't have DMA.
Additional context
Arduino SPI api
https://www.arduino.cc/en/Reference/SPI
STM official implementation
https://github.com/stm32duino/wiki/wiki/API#spi
https://github.com/stm32duino/Arduino_Core_STM32/blob/master/libraries/SPI/src/SPI.h
libmaple (roger's) core implementation
F1
https://github.com/rogerclarkmelbourne/Arduino_STM32/blob/master/STM32F1/libraries/SPI/src/SPI.h
F4
https://github.com/rogerclarkmelbourne/Arduino_STM32/blob/master/STM32F4/libraries/SPI/src/SPI.h
The text was updated successfully, but these errors were encountered: