How many times it is possible to write on NV memory of cc2530? and cc2531?
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.
If you mean erase and write, you have an endurance of 20,000 cycles (cf.Section 2.2.3 of the User Guide). If you mean writes without erasing (one-to-zero transitions only), see Section 6.2.2 of the CC253x User Guide. The numbers are the same for CC2530 and CC2531.
Thanks hec, for your information.
But I still have doubts...
So, I'm using the OSAL_NV proceedings to read and write on NV memory.
1- With this proceeding it possible write onli 20,000 cycles too?
2- And the read? It is unlimited?
Pe Lopez said:1- With this proceeding it possible write onli 20,000 cycles too?
I don't know the details of this code, but if it erases before it writes and uses the same flash page every time, the limit is 20,000.
Pe Lopez said:2- And the read? It is unlimited?
Yes, it is unlimited.
Pe Lopez said:1- Is there any problem to do this?
Yes, you can only change a bit from 1 to 0, not 0 to 1 (only the erase operation can do that). There is also a limited number of writes possible before you need to erase (8 times for a single 32-bit word). A 32-bit word that has previously not been written since the last erase of the page can always be written. Please read Section 6.2.2 of the User guide, as it explains this very thoroughly.
Pe Lopez said:2 - This means that I can write more times?
Yes, especially if you only need to write a small amount of data. In this case, you can use a flash page by writing new data to the first word that has not yet been written, then erase it only when it goes full. If you have enough space so that you can use more than one flash page, this further increases the possible endurance.
In general, you need to be careful when you design your system so that you only store data that really needs retention on the flash, and make sure that you do not update too often - if you can live with an old value in case of a reset, you should only update the value in flash as often as needed. It is a little difficult to be more specific since I don't know your application.
The write only happen at startup, or on a system reconfiguration.
Because, every time that a new device join the network the coordinator will save a structure with 11 bytes.
From what I understand, with your and the user guide information, this procedure doesn't endanger the flash.
Thanks Hec for your information very useful.
Hi Hec,
I also have doubt about writting multiple times to a word in flash. I made program that writes one byte of informations frequently (about 20 times per day). If I use one word to write four times in it, I can write 2048 times in one page before erasing (controller is CC2530 with 256kB of flash). But Users Guide ( swru191d.pdf part 6.2.2) says that I can write to one page 1024 times after erasing flash? Is this true, or I misunderstanding something?
Thanks,
vukadin
Hi Vukadin,
I am afraid the 1024 writes per page per erase is one of the limitations, so after 1024 writes to one page you should erase it, even if each write is of 8 bits only.
However, with 20000 erase cycles and 1024 writes per erase cycle, you can write 20 million times. With 20 writes per day, it will take one million days before the flash lifetime has expired. That corresponds to 2738 years. I think you can safely assume that something else will break down before that :-)