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

saving information through a DFU

Hi,

  • The user can change some parameters by issuing BLE commands to my device from a phone app.
  • I want to be able to preserve these parameters that may have been changed by users, even after a DFU (OTA) has happened.
  • Currently, I store these in NV memory, so I read them on power up.
  • But when a DFU happens, all that is lost.
  • The UICR seems to only be usable when flashing a hex file using something like nrfjprog.
  • Or, if done in run-time code (which is what I'd like to be able to do), can only be written to before the SD is initialized...
  • Of course, the latter is not possible since my code uses the SD....
  • Is there a way to write to some part of the NV memory during run time,  which can be protected during a DFU?
  • The Memory Protection Unit says that I can't write to CR1 if I am using CR0 and vice-versa...
  • Plus I'm not sure whether my dual-bank DFU algorithm uses both code regions and so will overwrite my parameters in any case!
  • BTW, my DFU is triggered by a command received over BLE, not using a hardware button or any other such external means...

Thanks for your prompt response!

Sincerely,

Jay Prabhakar.

Related