I am new to SPI flash memory reading and/or writing. As I was fiddling with it, I see that I cannot write to the first 32 bytes of the device GD25Q128C. It always reads back something that I have not written.
I have checked online and think that it could be due the first 32 bytes of every page is used for some other purpose?
I can successfully write and read from the remaining addresses.
Can somebody give more information on this?
Update:
It is the wikipedia that hints my assumption
Following image shows the logic analyzer capture for writing to first 32 bytes:
Following image shows the logic analyzer capture for writing after first 32 bytes:
02 00 00
(3 bytes) followed by 10 bytes of data (00 ... 09
), while when you write to address 20 you're sending02 00 00 20
(4 bytes) followed by the same 10 bytes data. \$\endgroup\$