Flash is structured not as one large memory but as 1-N regions and each region has 1-N blocks of a paticular size. You can not usually erase just a single byte of flash, so you have to erase the whole block, and then make any changes you need. I know, poor explanation, but google may have a better one, or altera. Either way, you have to take that into account when making a change as you may inadvertently corrupt part of a block if you try and do a partial write. But, per your other thread, if you are just doing a single write then reading back and it is failing that should not be a corruption problem. But, try only writing a block at a time, and looping until you have written all of your data. The code to get the block size is above.