1.. _summary-cmd:
2
3Summary
4=======
5
6The ``espefuse.py summary`` command reads all eFuses from the chip and outputs them in text or json format. It is also possible to save it to a file.
7
8Optional arguments:
9
10- ``--format`` - Select the summary format: ``summary`` - text format (default option), ``json`` - json format. Usage ``--format json``.
11- ``--file`` - File to save the efuse summary. Usage ``--file efuses.json``.
12
13Text Format Summary
14-------------------
15
16The text format of summary consists of 3 main columns:
17
181. This column consists of the eFuse name and additional information: the block name associated with this eFuse field and encoding errors (if any).
192. Description of eFuse field.
203. This column has human readable value, read/write protection status, raw value (hexadecimal or binary).
21
22Read and Write Protection Status
23^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24
25The ``R/W`` output indicates a protection status of a specific eFuse field/block:
26
27- ``-/W`` indicates that read protection is set. Value of such eFuse field will always show all-zeroes, even though hardware may use the correct value. In espefuse v2.6 and newer, read-protected eFuse values are displayed as question marks (``??``). On earlier versions, they are displayed as zeroes.
28
29    .. code-block:: none
30
31        BLOCK1 (BLOCK1):
32        = ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/W
33
34- ``R/-`` indicates that write protection is set. No further bits can be set.
35- ``-/-`` means both read and write protection are set.
36
37Some eFuses have no protection at all, and some eFuses have only one read or write protection. There is no mark in the summary to expose it.
38
39Display Efuse Summary
40^^^^^^^^^^^^^^^^^^^^^
41
42The eFuse summary may vary from version to version of this tool and differ for different chips. Below is the summary for the {IDF_TARGET_NAME} chip.
43
44For details on the meaning of each eFuse value, refer to the `Technical Reference Manual <http://espressif.com/en/support/download/documents>`__.
45
46.. include:: inc/summary_{IDF_TARGET_NAME}.rst
47
48Json Format Summary
49-------------------
50
51The json representation of eFuses for the ESP32 chip is shown below.
52
53.. code-block:: none
54
55    > espefuse.py summary --format json
56
57    {
58        "ABS_DONE_0": {
59            "bit_len": 1,
60            "block": 0,
61            "category": "security",
62            "description": "Secure boot V1 is enabled for bootloader image",
63            "efuse_type": "bool",
64            "name": "ABS_DONE_0",
65            "pos": 4,
66            "readable": true,
67            "value": false,
68            "word": 6,
69            "writeable": true
70        },
71        "BLOCK1": {
72            "bit_len": 256,
73            "block": 1,
74            "category": "security",
75            "description": "Flash encryption key",
76            "efuse_type": "bytes:32",
77            "name": "BLOCK1",
78            "pos": 0,
79            "readable": true,
80            "value": "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",
81            "word": 0,
82            "writeable": true
83        },
84    ...
85        "CODING_SCHEME": {
86            "bit_len": 2,
87            "block": 0,
88            "category": "efuse",
89            "description": "Efuse variable block length scheme",
90            "efuse_type": "uint:2",
91            "name": "CODING_SCHEME",
92            "pos": 0,
93            "readable": true,
94            "value": "NONE (BLK1-3 len=256 bits)",
95            "word": 6,
96            "writeable": true
97        },
98    ....
99    }
100
101Save Json Format Summary To File
102--------------------------------
103
104.. code-block:: none
105
106    > espefuse.py summary --format json --file efuses.json
107
108    Connecting..........
109    Detecting chip type... Unsupported detection protocol, switching and trying again...
110    Connecting....
111    Detecting chip type... ESP32
112
113    === Run "summary" command ===
114    Saving efuse values to efuses.json
115