Skip to main content
Iswarya
Associate III
October 23, 2020
Question

STM2 SPI state machine for HAL_BUSY

  • October 23, 2020
  • 1 reply
  • 783 views

Hi,

I see there are different states for SPI transfer/Receive.

There are 4 different status when we use HAL_SPI_Transmit_Receive_DMA()

What is the next step if we receive the status as HAL_BUSY, HAL_ERROR, HAL_TIMEOUT.

Can you please help me to get some state machine?

This topic has been closed for replies.

1 reply

TDK
October 23, 2020

If it's busy, wait until it's done to use it.

If there's an error, figure out the source of the error and fix it. A few things can trigger this, see the source code for HAL_SPI_TransmitReceive_DMA.

I don't see how a timeout is possible.

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