This example presents the functionality of the Experimental: Flash Storage 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:
- Compile and program the application.
- Start a terminal emulator like PuTTY (recommended) with the following Terminal settings and establish a UART connection.
-
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.
-