Forum Discussion
Altera_Forum
Honored Contributor
14 years agoIf you want to save data in flash you need to understand how the flash devices work - and their limitations - and then format your data appropriately.
For 'nor' flash (I believe nand is similar but can have bad sectors) the only way to change a '0' to a '1' is to erase a complete flash sector (which might be 128k bytes), individual bits can be changed from '1' to '0' (usually as a word write). Erases are very slow (significant fraction of a second), writes are relatively slow. It is also likely that no other memory cycles can be issued to the flash while a write/erase is in progress. You also need to limit erases to avoid wearing out the devices.