AnsweredAssumed Answered

STM32F3 1.4.0 Firmware SPI Problem

Question asked by riggs.rob on Feb 14, 2016
Latest reply on Feb 17, 2016 by Amel N
I am trying to use HAL_SPI_TransmitReceive() to read & write to a 25AA320A SPI EEPROM. 

The data was either read and/or written corrupted.  The data retrieved after a write was there, but the order was scrambled (not just byte swapped).  I spent days trying to understand the problem -- in both hardware and software.  After digging in to the code and some online examples, I noticed that HAL_SPI_TransmitReceive() tries to read/write 16-bit values when more than one byte needs to be read or written, even with SPI_DATASIZE_8BIT.

The way the code is written seems to be broken.  Removing the 16-bit reads and writes when "hspi->RxXferCount > 1" or "hspi->TxXferCount > 1" allows me to read and write the EEPROM properly.

Is this a known problem with this firmware version?  Or is there something I am missing about how this function is used or the way the SPI peripheral needs to be configured?