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

How to write to flash with sd_flash_write?

Using SDK v11.0 and SD v2.0.0 on nRF52832 with ARM GCC.

I want to copy page(s) content to another page(s), I tried the following but couldn't succeed.

When I used the sd_flash_write command, the return value is 1 (NRF_ERROR_SVC_HANDLER_MISSING) and content is not copied there. I used the command directly like this:

err_code = sd_flash_write(dest_addr, src_addr, 1024);

Am I missing something?

Alternatively, to achieve the same thing, I looked at pstorage but I was not able to find how to specify both the target and source address in a single step. I could, however, use the NVM commands which work fine, but that is taking very long to finish the process.

Any help would be appreciated.

Parents
  • Hello,

    I know it may already be too late, depending on how much of the development you have done, but I recommend you consider moving to a later version of the SDK. Right now we are at version SDK15.3.0. Quite a lot has happened with flash handling since SDK11.0.0.

    If you use the softdevice, you can't use the NVMC backend. You must use the sd_flash... API. 

    Have you enabled the softdevice before calling sd_flash_write?

Reply
  • Hello,

    I know it may already be too late, depending on how much of the development you have done, but I recommend you consider moving to a later version of the SDK. Right now we are at version SDK15.3.0. Quite a lot has happened with flash handling since SDK11.0.0.

    If you use the softdevice, you can't use the NVMC backend. You must use the sd_flash... API. 

    Have you enabled the softdevice before calling sd_flash_write?

Children
Related