2025-12-17 9:28 AM - last edited on 2025-12-17 9:48 AM by Andrew Neil
Dear all
I am relatively new to STM32, using STM32H563 as an SPI slave to receive data and send some feedback data as same time, The SPI master is a Tiva MCU form Ti, as data is relatively long, I need to use DMA, I tried to find an example for it, but there is none with DMA, could some one please provide some starting point for me?
Thanks in advance.
Ping
2025-12-17 10:22 AM
Here is an example of using an SPI slave for transmit and receive on the STM32H5 using DMA:
2025-12-18 1:49 AM
Hi, TDK
Thank you for your quick reply, tried to download the whole repository and still found some drivers are missing, they seems linked to other libraries. What is the recommended way to import this specific project only to CubeIDE and let it compile please?
Also, noticed it uses Link-list for DMA, which is new to me too, is it used for continuous TX/RX between Master and slave? will normal work? Sorry, i am asking too many questions.
Regards!
Ping
2025-12-18 1:53 AM - edited 2025-12-18 1:58 AM
Hello,
@Ping1 wrote:
Hi, TDK
Thank you for your quick reply, tried to download the whole repository and still found some drivers are missing, they seems linked to other libraries. What is the recommended way to import this specific project only to CubeIDE and let it compile please?
You need to git clone with recursive option. Please read this knowledge base: Downloading STM32Cube packages from GitHub correctly
2025-12-18 5:23 AM
Thank you all for reply.
Now I have tried to copy the example to my project and found it only receives once and then ignore the rest of data packets coming, I am not sure the original example, is it designed doing once only, or continuously?
What is needed in order to let it run continuous ? any advice is appreciated.
Regards!
Ping
2025-12-18 5:52 AM
Use the Example Selector in STM32CubeMX to import this project into STM32CubeIDE. That's the easiest way to load an example.
2025-12-18 5:54 AM
@Ping1 wrote:
I am not sure the original example, is it designed doing once only, or continuously?
What the readme file of example is saying?
2025-12-18 6:20 AM
Hi,
I haven't found anything information on readme file regarding it run once or multiple, probably run once once after button press, hence, I am asking the question and also get some confirm from experts here, please kindly let me know if you know the answer.
Regards!
Ping
2025-12-18 6:40 AM
Hi, TDK
It is a good idea, however, I imported as example it although i don't have exact hardware board and therefore unable to try. I am not sure why the same example project is not available on STM32H563.
Regards!
Ping
2025-12-24 6:55 AM
Hello @Ping1
@Ping1 wrote:
Thank you all for reply.
Now I have tried to copy the example to my project and found it only receives once and then ignore the rest of data packets coming, I am not sure the original example, is it designed doing once only, or continuously?
What do you mean by once? Do you mean 1 byte?
The example is designed to send and receive a specified number of bytes, and then verify that the transmitted and received data match.