Forum Discussion
EricMunYew_C_Intel
Frequent Contributor
5 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