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

Write and read flash using sd_write_flash and sd_?

I want to use the SoftDevice APIs to read and write flash on the nRF51822. Are there any examples of how to do this. I see all kinds of mixes between pstorage, NVIC (not sure what that stands for) and the softdevice APIs. I did read that if SoftDevice is enabled one should use the SoftDevice APIs. I will be using soft device and lots of soft device BTLE APIs.

However, I don't see any examples of how to do this using JUST the soft device APIs. There isn't even a read method, just write, protect, and erase. Its probably somewhere in the documentation but the search engine is so bad you have to know exactly what you want and what it is called to get anywhere with it.

I want to save and restore pairing/bonding info in the same manner I do it on the PC using the pc-ble-driver. Therefore I do not want to use any of the SDK methods.

Parents Reply
  • So what you are saying is that both fstorage and FDS are using SoftDevice to write to flash. I see how SoftDevice is writing to flash. There is a clear method for that.. What I don't see is how SoftDevice reads from flash. Are there any examples using SoftDevice that write and read from flash? Just an example that writes a buffer of data to flash and then reads it would be nice.

    Again, this info probably exists in the documentation somewhere but the search engine is so minimal one will never find it. The search engine didn't even find the word 'wait' when it was right in the text on the very page I was viewing. So I have to post far too many questions in this forum.

Children
Related