AnsweredAssumed Answered

Bug report: (STM32F0 v1.5) SPI TansmitReceive function doesn't receive properly after Transmit function

Question asked by aap.broodje on Aug 17, 2016
Latest reply on Aug 18, 2016 by FTITI.Walid
After generating code using CubeMX 4.14.0 for an STM32F030C6, I noticed a bug in using the blocking (non interrupt or DMA) functions for SPI.

When switching between using the functions HAL_SPI_Transmit and HAL_SPI_TransmitReceive, the function HAL_SPI_TransmitReceive writes only zeroes in the RX array when it is called after HAL_SPI_Transmit. Actual received bits are confirmed on an oscilloscope.

This was tested while communicating with serial flash IS25LQ010B-JNLE, but it is very likely unrelated to the answering device.

If only the function HAL_SPI_TransmitReceive is used, it works every time. No problem.

Outcomes