zephyr/samples/drivers/spi_flash
Pieter De Gendt 9b706a099d samples: drivers: spi_flash: Remove obsolete CONFIG_SPI_NOR configs
The Kconfig symbol for CONFIG_SPI_NOR is selected by default if a
compatible device is enabled.
Remove obsolete board config files.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-02-27 14:35:15 +01:00
..
boards samples: drivers: spi_flash: Remove obsolete CONFIG_SPI_NOR configs 2023-02-27 14:35:15 +01:00
src samples: spi_flash: Add option to test multiple sectors 2023-01-26 09:39:59 +00:00
CMakeLists.txt
README.rst
prj.conf
sample.yaml

README.rst

.. _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
<dt-guide>` 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!