This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is it possible to continuously log data to flash memory?

I'm not sure if this question has been asked here before, but I couldnt find an existing answer...

I know that flash memory only has a relatively limited number of write / erase cycles.

For the nRF51 this is 20,000.

But from what I understand, this number is for the erase command to a page of flash.

So it may be possible to log to flash, by writing to the next available empty address, rather than erasing an overwriting an existing value.

Hence the number of log values that can be written is governed by the size of a flash page, and the number of available pages in flash (not used for the Application)

Is there any existing example code which does this sort of thing? As I think that data logging is a common requirement.

Related