How do i read data from 25AA02UID (EEPROM) using SPI?
I am using SPI3 of STM32F446ZE MCU to communicate with 25AA02UID EEPROM. I am writing 8 bytes and reading 12 bytes (4 bytes + last written 8 bytes).
I am using HAL Library for this operation. For writing I am using:
HAL_SPI_Transmit()And for reading I am using:
HAL_SPI_Receive()I believe the writing is done properly as it is normal SPI communication, but while reading its responding with random data! The above receive function transmits dummy and then receive and I guess that it might be reason that its responding with some garbage data.
I have seen the read sequence given in datasheet of it, And after sending the instruction and address from where to read, the datasheet suggests that Master clock should be on after above sequence but how this can be done? How can I keep SPI clock ON without sending data?
Notes:
Link to datasheet:
