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

How to reset DFU state after interrupted update attempt?

I am currently testing DFU updates with nRF52. I have run into a situation where the upload of new image is interrupted for some reason. When I try to run the update again later, I noticed that the SELECT command will return non-zero offset, indicating that there has been already some data written to this object.

I have understood that I can continue from the same point where I left off earlier. However, I would like to know if it is possible to reset the internal state of the nRF52 so that I can start the entire update procedure from scratch. In other words, I would like to make the nRF52 to forget any data that I have previously written to the *.dat or *.bin object.

Any pointers how to do this? I did not find any suitable opcode in the DFU documentation.

Performing a chip erase would obviously wipe the history, but I am looking for a solution that can be applied for units in the field.

Parents
  • Some more details: I read the DFU spec again and the CREATE command is documented as follows: 

    "Creates an object with the given type and selects it. Removes an old object of the same type (if such an object exists)."

    In my DFU host code, I always issue the create command, followed by select command. Based on the quote above, I would expect the create command to always wipe the old data if the object already exists.

    I am using SDK v13.

Reply
  • Some more details: I read the DFU spec again and the CREATE command is documented as follows: 

    "Creates an object with the given type and selects it. Removes an old object of the same type (if such an object exists)."

    In my DFU host code, I always issue the create command, followed by select command. Based on the quote above, I would expect the create command to always wipe the old data if the object already exists.

    I am using SDK v13.

Children
Related