zephyr/samples/drivers/spi_flash
Francois Ramu e9dd412a3d boards: arm: stm32h7b3 disco kit has external octo NOR flash controller
Add the alias to the MX25LM512 octo-NOR flash for the spi-flash node.
Remove the overlay for the samples/drivers/spi_flash as no MDMA driver
exists yet for the stm32h7.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-05-10 19:13:45 +02:00
..
boards boards: arm: stm32h7b3 disco kit has external octo NOR flash controller 2023-05-10 19:13:45 +02:00
src samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
CMakeLists.txt
README.rst
prj.conf
sample.yaml samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00

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!