This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Flash erase

Dear all,

I am a little confused about erasing data contained in a flash block. In this link the clear example shows that it is possible to clear bytes from a specified block. However, when we scroll down we can read in the "Specifics and limitations of the SDK implementation" section that SDK don't allow clearing of blocks.

Would any one please like to explain to me ?

Thank you.

Parents
  • Hi boss,

    Flash on Nordic's nRF51 works as follows:

    • You can erase it by page (1024B) or all (256x1024B). This will set all bits to 1 (all bytes = 0xFF).
    • You can write word by word (32-bit architecture) meaning that by "writing" you can turn any bit to 0 but not the other way.
    • Theoretically you can be writing to the same word again and again but result will be superposition of written data (all bits set to 0 in any write will be zeros).

    So depends on your use case when you want to erase particular page (and potentially backup the content and then use it during write) and when you allow writing. Note that erase operation is the most time consuming (in reality erasing 128kB takes ~3 seconds on nRF51822).

    Cheers Jan

Reply Children
No Data
Related