cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F042 SPI DMA jammed

Laurence Blaxter
Associate II
Posted on October 19, 2017 at 16:29

Hi,

 I'm trying to create a project using CubeMX which will use SPI1 with DMA. Unfortunately the SPI HAL driver seems to lock up after a few milliseconds of transactions (about 40 slave transactions). I see

Lock = HAL_UNLOCKED, State = HAL_SPI_STATE_BUSY_TX_RX, ErrorCode = 0

and the state never clears.

Can anyone offer any advice on what could cause this sort of lock up?

1 REPLY 1
Laurence Blaxter
Associate II
Posted on October 19, 2017 at 16:32

some further information, I call the HAL using

HAL_SPI_TransmitReceive_DMA(&hspi1, LSM6DSL_Read_Bytes, rawbuff, LSM6DSL_Read_Transaction);

but at the point of failure the state is still busy even though the callback function from the previous transaction has been called.