cancel
Showing results for 
Search instead for 
Did you mean: 

STM2 SPI state machine for HAL_BUSY

Iswarya
Associate II

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?

1 REPLY 1
TDK
Guru

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".