Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Khoa Nguyen a3868c967c samples: drivers: spi_flash: Add support OSPI for Renesas RA8 1 month ago
..
boards samples: spi_flash: add support for blackpill_f411ce 3 months ago
src samples: drivers: spi_flash: Add support OSPI for Renesas RA8 1 month ago
CMakeLists.txt
README.rst samples: spi_flash: node from compat, not alias 1 year ago
prj.conf samples: drivers: spi_flash: Remove unnecessary Kconfig option changes 7 months ago
sample.yaml samples|tests: drivers: flash: Add support for "jedec,mspi-nor" devices 4 months ago

README.rst

.. zephyr:code-sample:: spi-nor
:name: JEDEC SPI-NOR flash
:relevant-api: flash_interface

Use the flash API to interact with an SPI NOR serial flash memory device.

Overview
********

This sample demonstrates using the :ref:`flash API <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 devicetree node with one of the
following bindings as a compatible:

* :dtcompatible:`jedec,spi-nor`,
* :dtcompatible:`st,stm32-qspi-nor`,
* :dtcompatible:`st,stm32-ospi-nor`,
* :dtcompatible:`nordic,qspi-nor`.

.. 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!