I have a device in which there is a SPI flash and a I2C EEPROM, W25Q256JV (32MB) and AT24C1024 (1MB) respectively.
The MCU writes data packets in the flash fifo and saves its read write pointers in eeprom.
Sometimes the data read from flash is bad data = 0x3F instead of valid data.
I am trying to find reasons what is specific about "0x3F"? Where can it come from?
Just in case the read pointer went awry to some unwritten location then I should get "0xFF" instead of "0x3F".
Or possibly that wrong data was written during write operation. In this case where can "0x3F" come from in the MCU? If its some uninitialized array even then it should be "0xFF".
Or is it possible that the data gets corrupt during SPI read or write communication? Is there any chance that "0x3F" comes from some power supply problem during this read or write operations?
This values "0x3F" is consistent and every time whenever I get bad data it is always "0x3F".
I am interested to know at an abstract level what could be the phenomenon of this "0x3F" showing-up in the data?