cancel
Showing results for 
Search instead for 
Did you mean: 

SPI using hardware SS and GPDMA triggered by a timer

andre239955_st
Associate II

Hi all,

I am using an STM32H5 micro. I need to send out a buffer of data at regular intervals. I use TIM15 to trigger the GPDMA which sends blocks of 6 bytes to the SPI. The SPI is programmed with TSIZE=6 to get the SS output low during the transmission. I absolutely need this. The screenshot below is the result from my code.

Screenshot 2026-02-16 131744.png

My problem is that the SPI only works ONCE. It seems to be stuck afterwards, I observe that CSTART of the SPI goes to 0. How can I get the SPI going on with TSIZE > 0 ?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

Keeping TSIZE=0 is one way. If you set TSIZE>0 and then complete a transaction, you will need to set CSTART again for the next transaction. This is difficult to do with DMA.

You do not need to set TSIZE to get SS output to be low during the transaction.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Super User

Keeping TSIZE=0 is one way. If you set TSIZE>0 and then complete a transaction, you will need to set CSTART again for the next transaction. This is difficult to do with DMA.

You do not need to set TSIZE to get SS output to be low during the transaction.

If you feel a post has answered your question, please click "Accept as Solution".

Hi, thank you for your remark, it works perfectly this way!