4 years, 11 months ago.

How can I save data in nRF51822 ?

Hi, all

I have a question about nRF51822 . The nRF51822 support the file system? I try to the code from Handbook


#include "mbed.h"
LocalFileSystem local("local");               // Create the local filesystem under the name "local"
int main() {
    FILE *fp = fopen("/local/out.txt", "w");  // Open "out.txt" on the local file system for writing
    fprintf(fp, "Hello World!");

But LocalFileSystem only works on the two original mbed boards (LPC1768 and LPC11u24).

So how can I save data if nRF51822 is power off?


Question relating to:

Nordic stack and drivers for the mbed BLE API

1 Answer

4 years, 11 months ago.

Try using the pstorage module from nordic-sdk. perhaps you'll find some useful information here:



with future versions of mbed, there will be a cross-platform on-chip filesystem, but that is at least a few months away.

Does SPI based SDFileSystem work with the nRF51-DK?

I tried to use Neil Thiessen's version of SDFileSystem. It compiles, but hangs after attempting to access any file.




How about for the nRF52-preview?

posted by Kevin Braun 26 Aug 2015

no, it doesn't.

posted by Rohit Grover 26 Aug 2015