This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I wish to use wear leveling to increase the write endurance of MSP430 flash. I'd like to find out if wear-leveling can be performed on MSP flash's special INFOMEM A/B/C/D segments, or whether wear-leveling is acceptable only on MSP flash's regular segments, or whether wear-leveling can't be performed at all on MSP flash. Please let me know.
Flash memory areas used to store boot loaders, operating system images, or other executable code, are generally erased less frequently. These areas are considered static.1
In the MSP430, things like your vector tables are in fixed locations, and thus can't be wear-leveled. In addition, the vector table is usually part of your application code, so that further restricts any effort to wear-level your code segments. I find it unreasonable to expect that you would be reprogramming your code region often enough to come anywhere near the Flash erase/write cycle limits.
Areas used to store data, like info partitions, are generally erased more frequently. These areas are considered dynamic. Dynamic wear-leveling solutions will only distribute flash usage across the data partition.1
In the MSP430, if you are storing dynamic data in sections of the FLASH (Info or otherwise) you might do some analysis to decide if wear-leveling is necessary. There isn't anything built in, so you would have to implement your algorithm on your own (or find suitable pre-existing code).
Help make the forums a better place. Please click "Verify Answer" when someone helps solve your issue.
Please use the button to insert code so that it is readable.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Brian Boorman:
I need to periodically save data only (not application code), and hence wished to use INFOMEM for wear-leveling. So the code region would not be erased and reprogrammed. But the MSP spec says flash endurance is minimum 10000 cycles.
MSP datasheet isn't specific whether that means the total number of all writes to flash can't exceed 10000 (in which case wear-leveling won't be of much help to me) or whether each INFOMEM/flash segment can be written up to 10000 times per segment. I need clarification on this issue. Thank you.
On MSP devices, Flash write endurance is rather “erase endurance” and specified as the minimum number of erase cycles of flash segments before failure. Each mass erase as well as each individual segment erase counts.
After a segment has been erased, a certain number of write operations can be performed, as long as these write operations do not exceed the total programming time, as specified in the datasheet.
So you can erase INFOD segment, then write your data to the first address. When you need to update your data, scan upwards to the first empty flash cell (0xff) and write the new data there. Same for reading: scan upwards for the last location that isn’t 0xFFFF.This way you can update a word value in a 256byte INFO segment 128times before you need to erase the segment. Giving you a ‘write endurance’ of at least 1.3 million write cycles just for this segment. Sure, this can’t be used that way if the data you need to store and update is the size or larger than a flash segment. Then normal wear leveling (using different sectors each time) is to be used. Still the same algorithm can be used: the last data set in a larger, sequentially filled storage area is the valid one.
Time to say goodbye - I don't have the time anymore to read and answer forum posts. See my bio for details.Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.I'm sorry that I can no longer provide help in the forum or by private conversation.
In reply to Jens-Michael Gross:
>Each mass erase as well as each individual segment erase counts.
I'd appreciate an expansion of the statement "Each mass erase as well as each individual segment erase counts." I'm unsure whether the statement means (a) flash write access will only fail for segments that are each erased/written 10000 times per segment (assuming each segment can withstand 10000 erase cycles of its own) or (b) flash write access will fail for all 20 segments that are each erased+written 500 times per segment (total erase cycles 10000). Please provide a clarification. Thank you.
In reply to Anil Go:
Anil Go I'm unsure whether the statement means (a) ... or (b)...
Each flash cell is individual. However, erase can either erase the whole device, or segments. It is the total erase count on each cell, and since cells are grouped into segments, you can extrapolate that it applies to the total number of erase cycles per segment, noting that a mass erase adds a one-count to each segment in turn. It is when each segment reaches it's own count of 10000 erase cycles.
And to clarify, the specification is written to guarantee successful programming when below the total erase cycle durability. That means that subsequent programming may fail, not will fail. You can check if it did fail, and if so, move onto a new segment and update your book-keeping accordingly.
Thank you for the clarification and advice.
Basically, each individual bit cell has its own ‘erase endurance’, but since you can only erase a whole segment at once, each segment has its own 'age counter'. So my statement meant “each erase, whether segment of mass erase, applied to an individual flash cell, counts”Flash wear-out happens because electrons are trapped in the isolating area that separates the charge trap (that holds the cell value) form the read/write electronic. At a certain point, these trapped electrons affect the reading of the cell content more than the content of the charge trap, and the cell content can’t be read anymore. So the effect is less, if you didn’t write a ‘0’ to the cell before next erasure. One could say that only cells containing a ‘0’ are really erased during an erase. So the minimum endurance value is a simplified worst-case value. Typically, you can do ten times more write/erase cycles befor efailure, but that's not guaranteed..
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.