cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in HAL_SPI F3 V1.5 Library HAL_SPI_Receive_DMA

frackers
Senior
Posted on August 05, 2016 at 05:17

The implementation of HAL_SPI_Receive_DMA() assumes that the Transmit is also DMA and uses HAL_SPI_TransmitReceive_DMA() internally which tries to write to a non-existent Tx DMA transfer complete callback (line 1622 of stm32f3xx_hal_spi.c) causing a hard fault.

I've run out of DMA channels so I don't have the option of using DMA transmit.

I would suggest that HAL_SPI_TransmitReceive_DMA() is modified to check the existence of the transmit (and/or receive) buffer and NOT try and write to non-existent variables.

4 REPLIES 4
frackers
Senior
Posted on August 11, 2016 at 01:27

Further testing makes me wonder if any of the SPI code other than the basic operation has actually been used by anyone!! 

Neither DMA or interrupt mode seem to do as advertised - the DAC, 4 UARTs are all working fine with a combination of DMA and interrupt I/O but the SPI totally defeats me :(

slimen
Senior
Posted on September 01, 2016 at 18:02

Hi frackers,

I think it's known issue as for F1 in this [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/Bug%20STM32CubeF1%20V1.2.0%20HAL_SPI_Receive_DMA%28%29&currentviews=9]thread. 

Regards

Imen.D
ST Employee
Posted on January 25, 2017 at 18:22

Hello frackers, 

Thank you for highlighting this issue. 

I would inform you that this problem

is fixed in the release of STM32CubeF3 V1.7.0.

All your feedback and suggestions are welcome.

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Code Wrangler
Associate III

Thanks frackers. You just saved me hours of debugging time. Still broken in F4 Version 1.21.0 (CubeMX version 4.27.0).