2016-05-06 03:54 AM
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-bug2016-05-06 05:50 AM
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-