cancel
Showing results for 
Search instead for 
Did you mean: 

A Bug With STM32Cube FW_F4 V1.11.0 Firmware on SPI module

mmh_web
Associate
Posted on May 06, 2016 at 12:54

Hello

I have upgraded from STM32Cube FW_F4 V1.10.0 to V1.11.0 and the SPI part doesn't work well. When sending only one byte at a very low speed with softwase NSS, the HAL_SPI_TransmitReceive() function will return before the byte has ben transmitted and thus leads to the following program release the CS Pin in my code.

I read the code of V1.11.0 and I found at line 919:

if((hspi->RxXferCount > 0U) && (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_RXNE)))

Because of C language's Lazy Evaluation, when hspi->RxXferCount has reached zero, it won't check SPI_FLAG_RXNE flag and the function will return at once. I think the order of to conditions should be changed. 

#stm32cube-firmware-spi-bug
1 REPLY 1
Nesrine M_O
Lead II
Posted on May 06, 2016 at 14:50

Hi jiasu.mi,

Thanks for highlighting this issue.It is a known bug, but the fix has not yet been released on the web. 

It will be available in next packages.

-Syrine-