1.. _dump-cmd: 2 3Dump 4==== 5 6The ``espefuse.py dump`` command allows: 7 8- display raw values of eFuse registers, grouped by block. Output corresponds directly to eFuse register values in the `register space <https://github.com/espressif/esp-idf/blob/master/components/soc/{IDF_TARGET_NAME}/include/soc/efuse_reg.h>`__. 9- save dump into files. 10 11Optional arguments: 12 13- ``--file_name`` - Saves dump for each block into separate file. Provide the common path name like /path/blk.bin, it will create: blk0.bin, blk1.bin ... blkN.bin. Then using ``burn_block_data`` command these dump files can be written to another chip. 14 15Raw Values Of Efuse Registers 16----------------------------- 17 18The number of blocks depends on the chips and can vary from 4 to 11. A block can have different names, which can be used with ``burn_key`` or ``burn_block_data``. 19 20The order of registers in the dump: 21 22.. code-block:: none 23 24 REG_0 REG_1 REG_2 REG_3 REG_4 REG_5 25 BLOCK0 ( ) [0 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 26 27.. only:: esp32 28 29 .. code-block:: none 30 31 > espefuse.py dump 32 33 Detecting chip type... Unsupported detection protocol, switching and trying again... 34 Connecting.... 35 Detecting chip type... ESP32 36 BLOCK0 ( ) [0 ] read_regs: 00000000 7e5a6e58 00e294b9 0000a200 00000333 00100000 00000004 37 BLOCK1 (flash_encryption) [1 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 38 BLOCK2 (secure_boot_v1 s) [2 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 39 BLOCK3 ( ) [3 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 40 41 EFUSE_REG_DEC_STATUS 0x00000000 42 43.. only:: esp32c2 44 45 .. code-block:: none 46 47 > espefuse.py dump 48 49 Connecting......... 50 Detecting chip type... ESP32-C2 51 BLOCK0 (BLOCK0 ) [0 ] read_regs: 00000000 00000000 52 BLOCK1 (BLOCK1 ) [1 ] read_regs: 11efcdab 00000000 00000000 53 BLOCK2 (BLOCK2 ) [2 ] read_regs: 558000a4 000094b5 00000000 00000000 00000000 00000000 00000000 00000000 54 BLOCK_KEY0 (BLOCK3 ) [3 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 55 56 BLOCK0 (BLOCK0 ) [0 ] err__regs: 00000000 00000000 57 EFUSE_RD_RS_ERR_REG 0x00000000 58 59.. only:: not esp32 and not esp32c2 60 61 .. code-block:: none 62 63 > espefuse.py dump 64 65 Connecting.... 66 Detecting chip type... ESP32-C3 67 BLOCK0 ( ) [0 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 68 MAC_SPI_8M_0 (BLOCK1 ) [1 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 69 BLOCK_SYS_DATA (BLOCK2 ) [2 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 70 BLOCK_USR_DATA (BLOCK3 ) [3 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 71 BLOCK_KEY0 (BLOCK4 ) [4 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 72 BLOCK_KEY1 (BLOCK5 ) [5 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 73 BLOCK_KEY2 (BLOCK6 ) [6 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 74 BLOCK_KEY3 (BLOCK7 ) [7 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 75 BLOCK_KEY4 (BLOCK8 ) [8 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 76 BLOCK_KEY5 (BLOCK9 ) [9 ] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 77 BLOCK_SYS_DATA2 (BLOCK10 ) [10] read_regs: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 78 79 BLOCK0 ( ) [0 ] err__regs: 00000000 00000000 00000000 00000000 00000000 00000000 80 EFUSE_RD_RS_ERR0_REG 0x00000000 81 EFUSE_RD_RS_ERR1_REG 0x00000000 82 83In the last lines, which are separated from the main dump, you can see the encoding scheme status for each block. If there are all zeros, then there are no coding scheme errors. 84 85Save Dump To Files 86------------------ 87 88This command saves dump for each block into a separate file. You need to provide the common path name ``/chip1/blk.bin``, it will create files in the given directory (the directory must exist): /chip1/blk0.bin, /chip1/blk1.bin - /chip1/blkN.bin. Use ``burn_block_data`` command to write them back to another chip. Note that some blocks may be read-protected, in which case the data in the block will be zero. 89 90.. code-block:: none 91 92 > espefuse.py dump --file_name backup/chip1/blk.bin 93 94 === Run "dump" command === 95 backup/chip1/blk0.bin 96 backup/chip1/blk1.bin 97 backup/chip1/blk2.bin 98 backup/chip1/blk3.bin 99 backup/chip1/blk4.bin 100 backup/chip1/blk5.bin 101 backup/chip1/blk6.bin 102 backup/chip1/blk7.bin 103 backup/chip1/blk8.bin 104 backup/chip1/blk9.bin 105 backup/chip1/blk10.bin 106 107These dump files can be written to another chip: 108 109.. code-block:: none 110 111 > espefuse.py burn_block_data BLOCK0 backup/chip1/blk0.bin \ 112 BLOCK1 backup/chip1/blk1.bin \ 113 BLOCK2 backup/chip1/blk2.bin 114