cancel
Showing results for 
Search instead for 
Did you mean: 

operation of HAL_SPI_TransmitReceive_DMA

pass3master
Senior

This question is about the operation of HAL_SPI_TransmitReceive_DMA.

When HAL_SPI_TransmitReceive_DMA(&hspi1 ...) is being transmitted (assumed SPI communication_A) and HAL_SPI_TransmitReceive_DMA(&hspi1 ...) is called (assumed SPI communication_B) SPI communication_A will be canceled and SPI communication_B will be executed? Or is SPI communication_B executed after SPI communication_A is completed?

1 ACCEPTED SOLUTION

Accepted Solutions
STea
ST Employee

Hello @pass3master ,

HAL_SPI_TransmitReceive_DMA will wait for the first transmit/receive operation as the second one will be blocked by HAL lock and unlock process and HAL state busy or ready.
Regards

In order 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.

View solution in original post

2 REPLIES 2
STea
ST Employee

Hello @pass3master ,

HAL_SPI_TransmitReceive_DMA will wait for the first transmit/receive operation as the second one will be blocked by HAL lock and unlock process and HAL state busy or ready.
Regards

In order 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.

Thank you for your response. I understand how it works, so I will consider it “resolved”.