1.. _jesd216-sample:
2
3JESD216 Sample
4##############
5
6Overview
7********
8
9This sample demonstrates how to use the JESD216 flash API to extract
10information from a compatible serial device, and serves as utility to
11generate ``jedec,spi-nor`` devicetree property values for the device.
12
13Building and Running
14********************
15
16The application will build only for a target that has a devicetree entry
17with ``jedec,spi-nor`` as a compatible, and for which the driver
18supports :kconfig:option:`CONFIG_FLASH_JESD216_API`.
19
20.. zephyr-app-commands::
21   :zephyr-app: samples/drivers/jesd216
22   :board: efr32mg_sltb004a
23   :goals: build flash
24   :compact:
25
26Sample Output
27=============
28
29.. code-block:: console
30
31   MX25R8035F: SFDP v 1.6 AP ff with 3 PH
32   PH0: ff00 rev 1.6: 16 DW @ 30
33   Summary of BFP content:
34   DTR Clocking not supported
35   Addressing: 3-Byte only
36   4-KiBy erase: uniform
37   Support QSPI XIP
38   Support 1-1-1
39   Support 1-1-2: instr 3Bh, 0 mode clocks, 8 waits
40   Support 1-1-4: instr 6Bh, 0 mode clocks, 8 waits
41   Support 1-2-2: instr BBh, 0 mode clocks, 4 waits
42   Support 1-4-4: instr EBh, 2 mode clocks, 4 waits
43   Flash density: 1048576 bytes
44   ET1: instr 20h for 4096 By; typ 48 ms, max 384 ms
45   ET2: instr 52h for 32768 By; typ 240 ms, max 1920 ms
46   ET3: instr D8h for 65536 By; typ 480 ms, max 3840 ms
47   Chip erase: typ 6144 ms, max 36864 ms
48   Byte program: type 32 + 1 * B us, max 192 + 6 * B us
49   Page program: typ 896 us, max 5376 us
50   Page size: 256 By
51   Suspend: B0h ; Resume: 30h
52   DPD: Enter B9h, exit ABh ; delay 40000 ns ; poll 0x3d
53   size = <8388608>;
54   sfdp-bfp = [
55           e5 20 f1 ff  ff ff 7f 00  44 eb 08 6b  08 3b 04 bb
56           ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
57           10 d8 00 ff  23 72 f5 00  82 ed 04 b7  44 83 38 44
58           30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
59           ];
60   PH1: ffc2 rev 1.0: 4 DW @ 110
61   sfdp-ffc2 = [
62           00 36 50 16  9d f9 c0 64  fe cf ff ff  ff ff ff ff
63           ];
64   PH2: ff84 rev 1.0: 2 DW @ c0
65   sfdp-ff84 = [
66           00 00 f0 ff  ff ff ff ff
67           ];
68   jedec-id = [c2 28 14];
69