A Bug With STM32Cube FW_F4 V1.11.0 Firmware on SPI module
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-05-06 3:54 AM
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
Labels:
- Labels:
-
STM32Cube MCU Packages
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-05-06 5:50 AM
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-