I wrote a simple program that writes a page of data to the Spansion flash (S25FL256S) IC on my Avnet Zedboard and then the reads this same data back for inspection.
I have attached a link below so that anyone can identify the particular Zedboard development board and the flash IC that I was referring to in my opening sentence.
I noticed that when I use the FlashRead() function provided by the Xilinx Corp. in its example programs, I read back extra bytes of data. I have attached a "screenshot" snippet of C code in a for loop (see picture - "Flashread returns extra bytes").
When you look at the contents of the for loop, I write a "page" of data into the flash IC once for every loop. The size of each "page" is 256 data entries. Therefore, in theory, beginning with the first data entry at , the last data entry should be at .
When I read back the data that I have just written into the flash, I see extra bytes in the ReadBuffer. I put a breakpoint within the for loop loop to examine the contents of the ReadBuffer after the 1st loop and took notice of these extra bytes.
I have attached a screenshot of the ReadBuffer which clearly shows new data entered into the ReadBuffer that is highlighted in yellow after the first loop (see the "screenshot" entitled, "ReadBuffer first pass.png").
This extra data appears to be invalid data - as it has no correlation with that data that was intended to be written into the flash IC.
Can anyone tell me why I am receiving this extra data?