FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6464 Discussions

How to store user data necessary on the next power up

SCroi1
Novice
737 Views

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 boot up (power up).

I tried storing this info in the UFM space at different addresses. The store/read from flash routine is working(tested) during normal run time. The problem is that when I try to read the data after power up it seems that all the UFM space not used for NIOS program is set to "0" and my stored data is not available anymore. How can I solve this problem?

Are there any settings that prevent the unused UFM to be set to "0" on power up?

Are there any flash locations where I can store my data for the next power up?

Thank you for your help!

0 Kudos
5 Replies
EricMunYew_C_Intel
Moderator
724 Views

Hi, Sorin


Do you mean you want to retain the data value of a variable in UFM flash when you power up again ? Normally the data value will be initialized to its initial value when you do power up again. The previous data will be gone.


Thanks.


Eric




0 Kudos
EricMunYew_C_Intel
Moderator
706 Views

Hi, Sorin


Do you have any more question ?


And can we close the case ?


Thanks.


Eric


0 Kudos
EricMunYew_C_Intel
Moderator
704 Views

Hi, 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



0 Kudos
EricMunYew_C_Intel
Moderator
704 Views

Hi, Sorin


Do you have anymore question ?


Thanks.


Eric


0 Kudos
EricMunYew_C_Intel
Moderator
698 Views

Hi, Sorin


The solution is provided in my previous reply. I will close the case.


Thanks.


Eric


0 Kudos
Reply