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

flash Read Exception

Hi, I am here in the use of Flash memory data when there is a strange question to consult. Due to my side of the application, you need to enter each case sd_power_system_off need to perform pstorage_update, update my data to the Flash kept inside. But I am here to test about twenty times, and found the data pstorage_load after all become 0xff, I doubted flash endurance, but I do not know so little, I can not think of other possibilities.

Parents
  • Did you test 20 times and it failed 20 times, or did it fail 1 out of 20 times? Are you using any other pstorage operations that are working? That pstorage_update() or cmd_queue_enqueue() returns NRF_SUCCESS only means that the pstorage software accepted your command. It doesn't mean that flash is actually updated.

    You need to register a callback handler according to the documentation.

    Then you will have to wait for the PSTORAGE_UPDATE_OP_CODE. This tells you that the update operation is completed, then you can go to System OFF.

  • I'm don't quite understand your last comment, but the flag is in PSTORAGE_CLEAR_OP_CODE, and you will get this event if you call pstorage_clear(). If you call pstorage_update(), you will get the PSTORAGE_UPDATE_OP_CODE event. You should check that you get this event before you call sd_power_system_off(), for example by using a flag.

Reply Children
No Data
Related