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

how to know it is first time to read from pstorage_load

in sdk 4.3, I used two different ways to know it is read first time(in factory)

  1. NRF_ERROR_NOT_FOUND from ble_flash_page_read to indicated first time it reads
  2. 0xff valued read as first time

now pstorage_load, certainly can't use NRF_ERROR_NOT_FOUND, how about 2) is it ok to use 0xff for a 8bit int value as indicator for first time read?

Thanks!

Related