nRF5 SDK v17.0.2
Flash Storage Example

This example presents the functionality of the Flash Storage (fstorage) library.

Two example projects are available for each supported board: with and without the SoftDevice.

After starting the example, it writes 0xBADC0FFE to the address 0x3e000. If the SoftDevice is present, it also writes 0xDEADBEEF to the address 0x3e100.

The example writes "hello world" to address 0x3f000.

This example uses the Command Line Interface library to receive user input and to display information about the result and status of the operations.

Setup

You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\peripheral\flash_fstorage

Testing

Test the Flash Storage Example application by performing the following steps:

  1. Compile and program the application.
  2. Start a terminal emulator like PuTTY (recommended) with the following Terminal settings and establish a UART connection.
  3. A menu is printed on the console. You can test the available commands. The commands are:
    • read: Read bytes from flash.
    • write: Write bytes from flash.
    • erase: Erase flash pages.
    • flasharea: Set the flash area boundaries.

Documentation feedback | Developer Zone | Subscribe | Updated