From e81e88e52e4f07ccf6f0764d7fe1848b2d65d26f Mon Sep 17 00:00:00 2001 From: Peter Bigot Date: Wed, 26 Aug 2020 09:48:32 -0500 Subject: [PATCH] samples: spi_flash: add README Basic example of basic flash API use when selecting a serial flash memory. Signed-off-by: Peter Bigot --- samples/drivers/spi_flash/README.rst | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 samples/drivers/spi_flash/README.rst diff --git a/samples/drivers/spi_flash/README.rst b/samples/drivers/spi_flash/README.rst new file mode 100644 index 00000000000..e459559a418 --- /dev/null +++ b/samples/drivers/spi_flash/README.rst @@ -0,0 +1,41 @@ +.. _spi-nor-sample: + +JEDEC SPI-NOR Sample +#################### + +Overview +******** + +This sample demonstrates using the flash API on a SPI NOR serial flash +memory device. While trivial it is an example of direct access and +allows confirmation that the flash is working and that automatic power +savings is correctly implemented. + +Building and Running +******************** + +The application will build only for a target that has a :ref:`devicetree +` entry with ``jedec,spi-nor`` as a compatible. + +.. zephyr-app-commands:: + :zephyr-app: samples/drivers/spi_flash + :board: nrf52840dk_nrf52840 + :goals: build flash + :compact: + +Sample Output +============= + +.. code-block:: console + + *** Booting Zephyr OS build zephyr-v2.3.0-2142-gca01d2e1d748 *** + + JEDEC QSPI-NOR SPI flash testing + ========================== + + Test 1: Flash erase + Flash erase succeeded! + + Test 2: Flash write + Attempting to write 4 bytes + Data read matches data written. Good!