- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Sorin
Do you have any more question ?
And can we close the case ?
Thanks.
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Sorin
Do you have anymore question ?
Thanks.
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Sorin
The solution is provided in my previous reply. I will close the case.
Thanks.
Eric
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page