README.rst
1.. zephyr:code-sample:: mspi-flash
2 :name: JEDEC MSPI-NOR flash
3 :relevant-api: flash_interface
4
5 Use the flash API to interact with a MSPI NOR serial flash memory device.
6
7Overview
8********
9
10This sample demonstrates using the :ref:`flash API <flash_api>` on a MSPI 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 :ref:`devicetree <dt-guide>`
19``flash0`` alias that refers to an entry with the following bindings as a compatible:
20
21* :dtcompatible:`ambiq,mspi-device`, `mspi-atxp032`
22
23.. zephyr-app-commands::
24 :zephyr-app: samples/drivers/mspi/mspi_flash
25 :board: apollo3p_evb
26 :goals: build flash
27 :compact:
28
29Sample Output
30=============
31
32.. code-block:: console
33
34 *** Booting Zephyr OS build zephyr-v2.3.0-2142-gca01d2e1d748 ***
35
36 JEDEC MSPI-NOR flash testing
37 ==========================
38
39 Test 1: Flash erase
40 Flash erase succeeded!
41
42 Test 2: Flash write
43 Attempting to write 4 bytes
44 Data read matches data written. Good!
45