Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 1 month ago.
Write to persistent memory of nrf51822
Dear all,
I have been trying to find a way to write to the flash memory of my nrf51822, some values, then read them out and update them.
I have come across the pstorage library, but I am struggling to import it to the mbed compiler inside the projects that I am already working on (BLE_GAT_EXAMPLE).
Also I wonder if there is a tutorial or a simple example that does exactly that.
Thank you very much for your help.
2 Answers
7 years, 1 month ago.
This is not currently supported. Though, you could buy an external flash chip and then use the BlockDevice API or FileSystem API (on top of BlockDevice) to store data there - https://os.mbed.com/docs/v5.6/reference/storage-overview.html.
7 years, 1 month ago.
It is supported through Nordic's fstorage
API. For an example, see https://github.com/roywant/EddystoneBeacon/blob/8d4f7fdc614e927e581c45a0b55adc194ffc8650/source/PersistentStorageHelper/nrfPersistentStorageHelper/nrfConfigParamsPersistence.cpp.