• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..22-Aug-2025-

boards/22-Aug-2025-

src/22-Aug-2025-

CMakeLists.txt A D22-Aug-2025234 96

README.rst A D22-Aug-20251.3 KiB4834

prj.conf A D22-Aug-202541 32

sample.yaml A D22-Aug-20251.3 KiB4342

README.rst

1.. zephyr:code-sample:: spi-nor
2   :name: JEDEC SPI-NOR flash
3   :relevant-api: flash_interface
4
5   Use the flash API to interact with an SPI NOR serial flash memory device.
6
7Overview
8********
9
10This sample demonstrates using the :ref:`flash API <flash_api>` on a SPI NOR serial flash
11memory device.  While trivial it is an example of direct access and
12allows confirmation that the flash is working and that automatic power
13savings is correctly implemented.
14
15Building and Running
16********************
17
18The application will build only for a target that has a devicetree node with one of the
19following bindings as a compatible:
20
21* :dtcompatible:`jedec,spi-nor`,
22* :dtcompatible:`st,stm32-qspi-nor`,
23* :dtcompatible:`st,stm32-ospi-nor`,
24* :dtcompatible:`nordic,qspi-nor`.
25
26.. zephyr-app-commands::
27   :zephyr-app: samples/drivers/spi_flash
28   :board: nrf52840dk/nrf52840
29   :goals: build flash
30   :compact:
31
32Sample Output
33=============
34
35.. code-block:: console
36
37   *** Booting Zephyr OS build zephyr-v2.3.0-2142-gca01d2e1d748  ***
38
39   JEDEC QSPI-NOR SPI flash testing
40   ==========================
41
42   Test 1: Flash erase
43   Flash erase succeeded!
44
45   Test 2: Flash write
46   Attempting to write 4 bytes
47   Data read matches data written. Good!
48