Skip to main content
Associate III
December 17, 2025
Solved

STM32H5: recent example of SPI slave with DMA for both RX/TX please

  • December 17, 2025
  • 3 replies
  • 1038 views

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

 

Best answer by TDK

Here is an example of using an SPI slave for transmit and receive on the STM32H5 using DMA:

https://github.com/STMicroelectronics/STM32CubeH5/tree/e6985112c824fce355638ef4e7113b1bc671f999/Projects/NUCLEO-H503RB/Examples/SPI/SPI_FullDuplex_ComDMA_Slave

 

3 replies

TDK
TDKBest answer
Super User
December 17, 2025
"If you feel a post has answered your question, please click ""Accept as Solution""."
Ping1Author
Associate III
December 18, 2025

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  

mƎALLEm
Technical Moderator
December 18, 2025


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

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
Ping1Author
Associate III
December 18, 2025

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

 

mƎALLEm
Technical Moderator
December 18, 2025

@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?

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
Ping1Author
Associate III
December 18, 2025

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