Forum Discussion
SCroi1
New Contributor
6 years agoHow to store user data necessary on the next power up
Hi, I have a MAX10 / NIOS II system with "Single Uncompressed image with memory initialization" configuration. During run time the system stores some data (512 bytes) that are needed at the next bo...
EricMunYew_C_Intel
Frequent Contributor
6 years agoHi, Sorin
Have you tried command alt_write_flash_block() when you are writing to MAX10 UFM ?
alt_write_flash() erase any affected pages of UFM then write to memory, this may erase your old data. To ensure that data isn’t destroyed when using the alt_write_flash() function, it’s recommended to perform a read-modify-write operation on the flash memory. Meaning, you read the entire page of memory into a buffer in RAM, modify the buffer with the data you want to include, erase the entire page, and write the buffer back to flash.
You can refer to https://www.intel.com/content/dam/altera-www/global/en_US/uploads/7/78/Utilizing_User_Flash_Memory_Design_Guide.pdf
Thanks.
Eric