2015-01-25 12:06 PM
Hi,
I have been tracking down a bug in my application that only appeared with certain optimisation options with gcc 4.9.3.It turns out the problem is that in the STM32F0 drivers the ''State'' member of the SPI_HandleTypeDef struct (and also the UART equivalent at least, I've not checked others) is not marked as __IO (which is a macro for volatile) even though it is modified by HAL_SPI_IRQHandler.This can cause calls to functions like HAL_SPI_GetState to be optimised incorrectly.I can see that State is correctly declared __IO in the STM32F4 drivers. I can also see that v1.2.0 of the STM32F0 drivers added __IO for the ErrorCode member but seems to have missed it for State.Could someone from ST confirm this is a mistake, presumably to be fixed in the next release?Thanks. #bug #hal #stm32f02015-02-10 07:29 AM
Is there any word that this bug (which affects several peripherals) is known about by ST?
Is there a bug tracker or something? That would be really useful.2015-03-16 03:49 AM
Hi Justyn,
we confirm that it’s an error, and have already listed within the STM32CubeF0 HAL bugs tracker. Keep an eye out for the next update! Thanks for the report.Best regards,Heisenberg.