Hi folks,
I am working on ble_app_uart example program nRF52 SDK 15.2 Verion , in this case i am writing the data in flash for future use , Now i am to get the specific data from flash, how to do that?
guide me
Hi folks,
I am working on ble_app_uart example program nRF52 SDK 15.2 Verion , in this case i am writing the data in flash for future use , Now i am to get the specific data from flash, how to do that?
guide me
Hi
In the Flash storage library, there are example snippets of code that shows you how to read and write data from specific flash addresses. Keep in mind that you will have to implement the necessary libraries/driver files that are used in the flash storage example project to run the fstorage commands.
Best regards,
Simon
Hi simon ...
I am working on flashstorage example only , using nrf_fstorage_write i am writing the data .Now i want to view my data which is written in flash either printing the data on termite or debug terminal .which command i should use?
Then you can use the snippet showing how you can read data and print it to wherever you want to view it, for example via UART or RTT.
You can also read data from flash using the nrfjprog command-line tool, which lets you either read the whole flash memory and store it using the --readcode command, or a given amount of bytes using the --memrd command. Use nrfjprog --help for further details on these commands.
Best regards,
Simon
sorry i am not asking about the command tool , i am asking about the function ? which function is used to view the data in flash?
Hi
That would be the function below. Then you can add a few lines to print the data using I.E. NRF_LOG_INFO to print the data you've just read.
static uint32_t number; ret_code_t rc = nrf_fstorage_read( &my_instance, /* The instance to use. */ FLASH_ADDR, /* The address in flash where to read data from. */ &number, /* A buffer to copy the data into. */ sizeof(number) /* Lenght of the data, in bytes. */ ); if (rc == NRF_SUCCESS) { /* The operation was accepted. */ } else { /* Handle error.*/ }
Best regards,
Simon