Hello!
You have to write into the internal flash if you want some persistent data.
TI publishes some source code that does exactly what you need.
What device are you using?
Addendum: By the way, this will depend on how many times you write to
the flash. The flash itself is limited to a certain amount of write operations.
I think 100.000 times. If you need only a few bytes, you can do a trick
by changing the write location at each write and it will improve the life
of the chip, but in some cases, it might be still not good enough.
Another solution is to use the recent FRAM based chips
with the folllowing advantages:
- You can write (if I remember correctly) on a byte unit (vs block unit for flash)
- The power needed is a lot lower than for flash, which might make sense for your application
- Write operation is extremely fast (same as above, since your app is low power, writing fast
will consume less).
- No practical write limitation. I don't even remember the number of times the FRAM
can be written, wait, I'll check... TI says it can be written 10^15 times, which is 10
billion times more than FLASH.
That's it!
Dora.