ARTICLE DETAIL

资讯详情

深耕网站建设、视觉设计与SEO优化的一线实战洞察。

ESP32-H2 eFuse 全量解读:基于 `idf.py efuse-summary` 的字段清单与安全配置指南

ESP32-H2 eFuse 全量解读:基于 `idf.py efuse-summary` 的字段清单与安全配置指南 ESP32-H2 eFuse 全量解读基于idf.py efuse-summary的字段清单与安全配置指南【免费下载链接】esp-idfEspressif IoT Development Framework. Official development framework for Espressif SoCs.项目地址: https://gitcode.com/GitHub_Trending/es/esp-idf本文以 ESP-IDF 仓库中 ESP32-H2 的idf.py efuse-summary参考输出docs/en/api-reference/system/inc/espefuse_summary_ESP32-H2.rst为骨架逐类别拆解 ESP32-H2 的 eFuse 字段含义、位域布局与可编程性并结合efuse组件源码给出 C 语言 API 符号与底层实现依据。读完本文你将能够读懂 ESP32-H2 的 eFuse 摘要输出、判断哪些字段可安全烧录、哪些与 Secure Boot / Flash 加密 / JTAG 等安全功能直接相关并能定位对应字段在仓库中的定义位置。一、什么是idf.py efuse-summaryidf.py efuse-summary是 ESP-IDF 提供给开发者的 eFuse 状态查看命令它与 esptool 工具链中的espefuse summary等价见 docs/en/api-reference/system/efuse.rst。该命令会连接芯片并输出一张按功能类别分组的字段清单列出每个 eFuse 字段的名称、所在块Block、含义描述、当前值、可读/可写状态以及十六进制原始值。在 ESP-IDF 的idf.py实现中该动作位于 tools/idf_py_actions/serial_ext.py实际调用链为idf.py efuse-summary→python -m espefuse summary。其中--port参数用于指定串口espefuse 必须指定端口才能访问芯片支持--virt虚拟 eFuse 模式、--debug、--do-not-confirm等透传参数也支持直接指定 eFuse 名称只查看单个字段源码中efuse_summary动作会追加efuse_name参数。输出格式说明EFUSE_NAME (Block) Description [Meaningful Value] [Readable/Writeable] (Hex Value)每行从左到右依次为字段名如WR_DIS、所属块如BLOCK0、含义描述、当前“有意义的值”如Enable、False或原始数值、可读写性R/W表示可读可写若被锁定会显示为R或-、以及十六进制/二进制原始值如0x00000000。二、ESP32-H2 eFuse 摘要完整输出文档原文以下即 ESP-IDF 文档为 ESP32-H2 保存的idf.py efuse-summary参考输出idf.py efuse-summary Executing action: efuse-summary (...) EFUSE_NAME (Block) Description [Meaningful Value] [Readable/Writeable] (Hex Value) ---------------------------------------------------------------------------------------- Config fuses: WR_DIS (BLOCK0) Disable programming of individual eFuses 0 R/W (0x00000000) RD_DIS (BLOCK0) Disable reading from BlOCK4-10 0 R/W (0b0000000) DIS_ICACHE (BLOCK0) Represents whether icache is disabled or enabled. False R/W (0b0) 1: disabled. 0: enabled POWERGLITCH_EN (BLOCK0) Represents whether power glitch function is enable False R/W (0b0) d. 1: enabled. 0: disabled DIS_TWAI (BLOCK0) Represents whether TWAI function is disabled or en False R/W (0b0) abled. 1: disabled. 0: enabled DIS_DIRECT_BOOT (BLOCK0) Represents whether direct boot mode is disabled or False R/W (0b0) enabled. 1: disabled. 0: enabled UART_PRINT_CONTROL (BLOCK0) Set the default UARTboot message output mode Enable R/W (0b00) HYS_EN_PAD0 (BLOCK0) Set bits to enable hysteresis function of PAD0~5 0 R/W (0b000000) HYS_EN_PAD1 (BLOCK0) Set bits to enable hysteresis function of PAD6~27 0 R/W (0b0000000000000000000000) BLOCK_USR_DATA (BLOCK3) User data 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 R/W BLOCK_SYS_DATA2 (BLOCK10) System data part 2 (reserved) 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 R/W Flash fuses: FLASH_TPUW (BLOCK0) Represents the flash waiting time after power-up; 0 R/W (0x0) in unit of ms. When the value less than 15; the wa iting time is the programmed value. Otherwise; the waiting time is 2 times the programmed value FORCE_SEND_RESUME (BLOCK0) Represents whether ROM code is forced to send a re False R/W (0b0) sume command during SPI boot. 1: forced. 0:not for ced FLASH_CAP (BLOCK1) 0 R/W (0b000) FLASH_TEMP (BLOCK1) 0 R/W (0b00) FLASH_VENDOR (BLOCK1) 0 R/W (0b000) Identity fuses: WAFER_VERSION_MINOR (BLOCK1) 0 R/W (0b000) WAFER_VERSION_MAJOR (BLOCK1) 0 R/W (0b00) DISABLE_WAFER_VERSION_MAJOR (BLOCK1) Disables check of wafer version major False R/W (0b0) PKG_VERSION (BLOCK1) Package version 0 R/W (0b000) OPTIONAL_UNIQUE_ID (BLOCK2) Optional unique 128-bit ID 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W BLK_VERSION_MINOR (BLOCK2) BLK_VERSION_MINOR of BLOCK2 0 R/W (0b000) BLK_VERSION_MAJOR (BLOCK2) BLK_VERSION_MAJOR of BLOCK2 0 R/W (0b00) DISABLE_BLK_VERSION_MAJOR (BLOCK2) Disables check of blk version major False R/W (0b0) Jtag fuses: JTAG_SEL_ENABLE (BLOCK0) Set this bit to enable selection between usb_to_jt False R/W (0b0) ag and pad_to_jtag through strapping gpio25 when b oth EFUSE_DIS_PAD_JTAG and EFUSE_DIS_USB_JTAG are equal to 0 SOFT_DIS_JTAG (BLOCK0) Represents whether JTAG is disabled in soft way. O 0 R/W (0b000) dd number: disabled. Even number: enabled DIS_PAD_JTAG (BLOCK0) Represents whether JTAG is disabled in the hard wa False R/W (0b0) y(permanently). 1: disabled. 0: enabled Mac fuses: MAC (BLOCK1) MAC address 60:55:f9:f7:2c:a2:ff:fe (OK) R/W MAC_EXT (BLOCK1) Stores the extended bits of MAC address ff:fe (OK) R/W CUSTOM_MAC (BLOCK3) Custom MAC 00:00:00:00:00:00:ff:fe (OK) R/W Security fuses: DIS_FORCE_DOWNLOAD (BLOCK0) Represents whether the function that forces chip i False R/W (0b0) nto download mode is disabled or enabled. 1: disab led. 0: enabled SPI_DOWNLOAD_MSPI_DIS (BLOCK0) Represents whether SPI0 controller during boot_mod False R/W (0b0) e_download is disabled or enabled. 1: disabled. 0: enabled DIS_DOWNLOAD_MANUAL_ENCRYPT (BLOCK0) Represents whether flash encrypt function is disab False R/W (0b0) led or enabled(except in SPI boot mode). 1: disable d. 0: enabled SPI_BOOT_CRYPT_CNT (BLOCK0) Enables flash encryption when 1 or 3 bits are set Disable R/W (0b000) and disables otherwise SECURE_BOOT_KEY_REVOKE0 (BLOCK0) Revoke 1st secure boot key False R/W (0b0) SECURE_BOOT_KEY_REVOKE1 (BLOCK0) Revoke 2nd secure boot key False R/W (0b0) SECURE_BOOT_KEY_REVOKE2 (BLOCK0) Revoke 3rd secure boot key False R/W (0b0) KEY_PURPOSE_0 (BLOCK0) Represents the purpose of Key0 USER R/W (0x0) KEY_PURPOSE_1 (BLOCK0) Represents the purpose of Key1 USER R/W (0x0) KEY_PURPOSE_2 (BLOCK0) Represents the purpose of Key2 USER R/W (0x0) KEY_PURPOSE_3 (BLOCK0) Represents the purpose of Key3 USER R/W (0x0) KEY_PURPOSE_4 (BLOCK0) Represents the purpose of Key4 USER R/W (0x0) KEY_PURPOSE_5 (BLOCK0) Represents the purpose of Key5 USER R/W (0x0) SEC_DPA_LEVEL (BLOCK0) Represents the spa secure level by configuring the 0 R/W (0b00) clock random divide mode ECDSA_FORCE_USE_HARDWARE_K (BLOCK0) Represents whether hardware random number k is for False R/W (0b0) ced used in ESDCA. 1: force used. 0: not force use d CRYPT_DPA_ENABLE (BLOCK0) Represents whether anti-dpa attack is enabled. 1:e False R/W (0b0) nabled. 0: disabled SECURE_BOOT_EN (BLOCK0) Represents whether secure boot is enabled or disab False R/W (0b0) led. 1: enabled. 0: disabled SECURE_BOOT_AGGRESSIVE_REVOKE (BLOCK0) Represents whether revoking aggressive secure boot False R/W (0b0) is enabled or disabled. 1: enabled. 0: disabled DIS_DOWNLOAD_MODE (BLOCK0) Represents whether Download mode is disabled or en False R/W (0b0) abled. 1: disabled. 0: enabled ENABLE_SECURITY_DOWNLOAD (BLOCK0) Represents whether security download is enabled or False R/W (0b0) disabled. 1: enabled. 0: disabled SECURE_VERSION (BLOCK0) Represents the version used by ESP-IDF anti-rollba 0 R/W (0x0000) ck feature SECURE_BOOT_DISABLE_FAST_WAKE (BLOCK0) Represents whether FAST VERIFY ON WAKE is disabled False R/W (0b0) or enabled when Secure Boot is enabled. 1: disable d. 0: enabled BLOCK_KEY0 (BLOCK4) Purpose: USER Key0 or user data 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 R/W BLOCK_KEY1 (BLOCK5) Purpose: USER Key1 or user data 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 R/W BLOCK_KEY2 (BLOCK6) Purpose: USER Key2 or user data 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 R/W BLOCK_KEY3 (BLOCK7) Purpose: USER Key3 or user data 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 R/W BLOCK_KEY4 (BLOCK8) Purpose: USER Key4 or user data 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 R/W BLOCK_KEY5 (BLOCK9) Purpose: USER Key5 or user data 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 R/W Usb fuses: DIS_USB_JTAG (BLOCK0) Represents whether the function of usb switch to j False R/W (0b0) tag is disabled or enabled. 1: disabled. 0: enable d USB_EXCHG_PINS (BLOCK0) Represents whether the D and D- pins is exchanged False R/W (0b0) . 1: exchanged. 0: not exchanged DIS_USB_SERIAL_JTAG_ROM_PRINT (BLOCK0) Set this bit to disable USB-Serial-JTAG print duri False R/W (0b0) ng rom boot DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE (BLOCK0) Represents whether the USB-Serial-JTAG download fu False R/W (0b0) nction is disabled or enabled. 1: disabled. 0: ena bled Vdd fuses: VDD_SPI_AS_GPIO (BLOCK0) Represents whether vdd spi pin is functioned as gp False R/W (0b0) io. 1: functioned. 0: not functioned Wdt fuses: WDT_DELAY_SEL (BLOCK0) Represents whether RTC watchdog timeout threshold 0 R/W (0b00) is selected at startup. 1: selected. 0: not select ed三、输出中的九大类字段逐一解析ESP32-H2 的 eFuse 摘要按Config / Flash / Identity / Jtag / Mac / Security / Usb / Vdd / Wdt九个类别输出。下面结合 components/efuse/esp32h2/esp_efuse_table.csv 中定义的位域bit_start、bit_count逐类展开。CSV 中所有字段都落在 256 位宽的 eFuse 块中摘要输出里的块编号与之对应。3.1 Config fuses配置类字段块位域含义WR_DISBLOCK00–3132 位逐位禁止对应 eFuse 字段的编程是 eFuse 的“写保护总开关”。一旦某位置 1关联字段永久不可再烧写RD_DISBLOCK032–387 位禁止从 BLOCK4–BLOCK10 读取用于对密钥块做读保护DIS_ICACHEBLOCK0401 位1 表示禁用 icache0 表示启用POWERGLITCH_ENBLOCK0421 位1 表示使能电源毛刺检测功能0 表示禁用DIS_TWAIBLOCK0461 位1 表示禁用 TWAICAN控制器0 表示启用DIS_DIRECT_BOOTBLOCK01291 位1 表示禁用 direct boot 模式0 表示启用UART_PRINT_CONTROLBLOCK0134–1352 位设置 ROM 启动时 UARTboot 的消息输出模式0始终输出、1复位时 GPIO8 为低才输出、2复位时 GPIO8 为高才输出、3完全关闭HYS_EN_PAD0BLOCK0154–1596 位逐位使能 PAD0~PAD5 的迟滞hysteresis功能HYS_EN_PAD1BLOCK0160–18122 位逐位使能 PAD6~PAD27 的迟滞功能BLOCK_USR_DATABLOCK30–255256 位用户数据块可整体作为 32 字节用户存储BLOCK_SYS_DATA2BLOCK100–255256 位系统数据第二部分系统保留其中UART_PRINT_CONTROL在 ESP-IDF 中被封装为esp_efuse_set_rom_log_scheme()见 components/efuse/esp32h2/esp_efuse_fields.c该函数读取当前值若尚未烧录则写入新的日志输出模式否则返回ESP_ERR_INVALID_STATE——说明该字段只能烧录一次。3.2 Flash fusesFlash 相关字段块位域含义FLASH_TPUWBLOCK0124–1274 位上电后 Flash 等待时间单位 ms。值小于 15 时等待时间即该值本身否则等待时间为编程值的 2 倍FORCE_SEND_RESUMEBLOCK01361 位1 表示强制 ROM 在 SPI boot 时发送 resume 命令0 表示不强制FLASH_CAPBLOCK1120–1223 位出厂烧录的 Flash 容量标识FLASH_TEMPBLOCK1123–1242 位出厂烧录的 Flash 温度等级标识FLASH_VENDORBLOCK1125–1273 位出厂烧录的 Flash 厂商标识3.3 Identity fuses身份信息字段块位域含义WAFER_VERSION_MINORBLOCK1114–1163 位晶圆wafer版本次版本号WAFER_VERSION_MAJORBLOCK1117–1182 位晶圆版本主版本号DISABLE_WAFER_VERSION_MAJORBLOCK11191 位1 表示跳过晶圆主版本检查PKG_VERSIONBLOCK1128–1303 位封装版本可调用esp_efuse_get_pkg_ver()见 components/efuse/esp32h2/esp_efuse_fields.c读取OPTIONAL_UNIQUE_IDBLOCK20–127128 位可选的 128 位唯一 IDBLK_VERSION_MINORBLOCK2130–1323 位BLOCK2 的版本次版本号BLK_VERSION_MAJORBLOCK2133–1342 位BLOCK2 的版本主版本号DISABLE_BLK_VERSION_MAJORBLOCK21351 位1 表示跳过块版本主版本检查OPTIONAL_UNIQUE_ID是常见的芯片唯一标识来源摘要输出中以 16 字节十六进制序列展示。3.4 Jtag fusesJTAG 控制字段块位域含义JTAG_SEL_ENABLEBLOCK0471 位当DIS_PAD_JTAG与DIS_USB_JTAG均为 0 时允许通过 strapping 引脚 GPIO25 在 usb_to_jtag 与 pad_to_jtag 之间选择SOFT_DIS_JTAGBLOCK048–503 位软件方式禁用 JTAG奇数值禁用、偶数值启用DIS_PAD_JTAGBLOCK0511 位硬件方式永久禁用 JTAG1 禁用、0 启用3.5 Mac fusesMAC 地址字段块位域含义MACBLOCK10–47跨 6 个字节记录出厂 MAC 地址48 位。摘要中以60:55:f9:f7:2c:a2:ff:fe形式输出并附(OK)表示 CRC 校验通过MAC_EXTBLOCK148–632 字节MAC 地址扩展位EUI-64 扩展标识CUSTOM_MACBLOCK3200–24748 位子字段USER_DATA.MAC_CUSTOM用户自定义 MAC 地址写入后 ESP-IDF 会优先使用它替代出厂 MACMAC 在 CSV 中通过“多行合并”机制定义MAC占 BLOCK1 的第 0~47 位40、32、24、16、8、0 各 8 位六条记录MAC_EXT占第 48~63 位这是 eFuse 字段跨任意位序定义的典型示例机制说明见 docs/en/api-reference/system/efuse.rst 的 Record Format 一节。3.6 Security fuses安全相关重点字段块位域含义DIS_FORCE_DOWNLOADBLOCK0441 位1 表示禁用“强制进入下载模式”功能如 GPIO 组合强制进 ROM 下载0 表示启用SPI_DOWNLOAD_MSPI_DISBLOCK0451 位1 表示 boot_mode_download 期间禁用 SPI0 控制器DIS_DOWNLOAD_MANUAL_ENCRYPTBLOCK0521 位1 表示禁用手动 Flash 加密SPI boot 模式除外SPI_BOOT_CRYPT_CNTBLOCK082–843 位Flash 加密使能位置 1 或 3 个位时使能 Flash 加密其余组合禁用0Disable、1Enable、3Disable、7EnableSECURE_BOOT_KEY_REVOKE0/1/2BLOCK085/86/87各 1 位吊销第 1/2/3 个 Secure Boot 密钥摘要KEY_PURPOSE_0~KEY_PURPOSE_5BLOCK088/92/96/100/104/108各 4 位对应 Key0~Key5 的用途如 XTS-AESFlash 加密、Secure Boot digest、USER 等SEC_DPA_LEVELBLOCK0112–1132 位通过配置时钟随机分频模式设定安全级别ECDSA_FORCE_USE_HARDWARE_KBLOCK0—1 表示 ECDSA 强制使用硬件随机数 k0 表示不强制ESP32-H2 支持 ECDSA 硬件加速摘要中单独列出CRYPT_DPA_ENABLEBLOCK01151 位1 表示使能抗 DPA 攻击功能SECURE_BOOT_ENBLOCK01161 位Secure Boot 使能开关1 启用、0 禁用SECURE_BOOT_AGGRESSIVE_REVOKEBLOCK01171 位1 表示使能激进的 Secure Boot 密钥吊销DIS_DOWNLOAD_MODEBLOCK01281 位1 表示禁用 ROM 下载模式。对应 C APIesp_efuse_disable_rom_download_mode()见 components/efuse/esp32h2/esp_efuse_fields.cENABLE_SECURITY_DOWNLOADBLOCK01331 位1 表示启用安全下载模式对应esp_efuse_enable_rom_secure_download_mode()SECURE_VERSIONBLOCK0137–15216 位ESP-IDF 防回滚anti-rollback特性使用的版本号SECURE_BOOT_DISABLE_FAST_WAKEBLOCK01531 位Secure Boot 使能时1 表示禁用 FAST VERIFY ON WAKE0 表示启用BLOCK_KEY0~BLOCK_KEY5BLOCK4~9各 256 位6 个密钥块可存储 Secure Boot 摘要或 Flash 加密密钥未使用时可作用户数据。摘要中附带各自的Purpose: USER说明3.7 Usb / Vdd / Wdt fuses字段块位域含义DIS_USB_JTAGBLOCK0411 位1 表示禁用 USB 切换为 JTAG 的功能USB_EXCHG_PINSBLOCK0571 位1 表示 D 与 D- 引脚交换DIS_USB_SERIAL_JTAG_ROM_PRINTBLOCK01301 位1 表示禁用 ROM boot 期间 USB-Serial-JTAG 打印DIS_USB_SERIAL_JTAG_DOWNLOAD_MODEBLOCK01321 位1 表示禁用 USB-Serial-JTAG 下载功能VDD_SPI_AS_GPIOBLOCK0581 位1 表示 VDD_SPI 引脚作为 GPIO 使用WDT_DELAY_SELBLOCK080–812 位1 表示启动时选择 RTC 看门狗超时阈值四、eFuse 块布局与编码方案源码视角ESP32-H2 共有 11 个 eFuse 块BLOCK0~BLOCK10每块 256 位。块布局在 docs/en/api-reference/system/efuse.rst 中有明确说明与摘要输出一一对应BLOCK0全部为系统参数含写保护WR_DIS、读保护RD_DIS、安全开关等BLOCK1、BLOCK2系统参数MAC、晶圆版本、Flash 标识、校准数据等BLOCK3EFUSE_BLK_USER_DATA用户数据其中USER_DATA.MAC_CUSTOM子字段用于自定义 MACBLOCK4~BLOCK9EFUSE_BLK_KEY0~KEY5密钥块供 Secure Boot / Flash 加密使用两个功能都不用时可作用户数据BLOCK10EFUSE_BLK_SYS_DATA_PART2系统保留。编码方案方面ESP32-H2 不支持选择编码方案与经典 ESP32 不同BLOCK0 自动使用None方案硬件对每 1 位保存 4 份备份因此 BLOCK0 可以多次写入BLOCK1~BLOCK10 自动使用 Reed-SolomonRS编码RS(44, 32)支持最多 6 字节自动纠错整块只能一次性写入。这些规则的底层实现可以在 components/efuse/esp32h2/esp_efuse_utility.c 中看到烧录流程从 BLOCK10 到 BLOCK0 倒序处理esp_efuse_get_coding_scheme()返回 RS 的块会先调用efuse_hal_rs_calculate()计算 12 字节校验符号再写入由于 RS 校验符号覆盖整个 256 位块烧写必须使用批量Batch Writing模式一次性完成。五、字段定义如何生成与维护摘要中展示的所有字段都定义在 components/efuse/esp32h2/esp_efuse_table.csv其格式为# field_name, efuse_block(EFUSE_BLK0..EFUSE_BLK10), bit_start(0..255), bit_count(1..256), commentfield_name支持用.定义父子字段如WR_DIS.RD_DIS、USER_DATA.MAC_CUSTOMCSV 中所有WR_DIS.*子字段与父字段WR_DIS的 32 位范围对齐由 components/efuse/efuse_table_gen.py 解析并生成 C 结构与头文件同时做字段名唯一性与位重叠检查生成的 C 符号位于 components/efuse/esp32h2/include/esp_efuse_table.h例如WR_DIS.RD_DIS对应ESP_EFUSE_WR_DIS_RD_DISUSER_DATA.MAC_CUSTOM对应ESP_EFUSE_USER_DATA_MAC_CUSTOM并提供了ESP_EFUSE_MAC_CUSTOM/ESP_EFUSE_CUSTOM_MAC等别名宏。因此idf.py efuse-summary展示的(Block)与十六进制值本质上就是 CSV 中字段位域在当前芯片上的实时状态而 C APIesp_efuse_read_field_blob、esp_efuse_write_field_blob等见 components/efuse/include/esp_efuse.h则允许在应用程序中读取或烧写这些字段。六、实际使用建议与安全提示烧录前先做摘要快照对一块新板执行idf.py efuse-summary连接串口先确认WR_DIS为 0、密钥块全部为 0再规划安全烧录流程。区分可逆与不可逆eFuse 位只能从 0 烧成 1不能回退。WR_DIS、RD_DIS、DIS_PAD_JTAG、DIS_DOWNLOAD_MODE、SECURE_BOOT_EN等一旦烧录即永久生效务必在生产前于开发板验证。密钥块用途由KEY_PURPOSE_x决定XTS-AES 系列用途用于 Flash 加密Secure Boot digest 系列用途用于 Secure Boot未用时保持USER可作普通用户数据。摘要输出中的BLOCK_KEY0~BLOCK_KEY5每块都会显示Purpose: USER表示当前未用作安全密钥。注意 RS 编码的整块写入限制BLOCK1~BLOCK10 只能一次性整体烧写不能在已有 RS 数据的块中追加写入否则会破坏既有校验符号详见 docs/en/api-reference/system/efuse.rst 的 Batch Writing Mode 警告。调试可用虚拟 eFuse开启CONFIG_EFUSE_VIRTUAL后 eFuse 操作被模拟到 RAM配合CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH与efuse_em分区可在重启后保留状态用于安全功能联调避免反复烧坏真实 eFuse。七、总结idf.py efuse-summary是理解 ESP32-H2 安全与配置状态的最直接入口。本文以仓库文档 docs/en/api-reference/system/inc/espefuse_summary_ESP32-H2.rst 的完整输出为基准结合 components/efuse/esp32h2/esp_efuse_table.csv 的位域定义、components/efuse/esp32h2/include/esp_efuse_table.h 的 C 符号以及 components/efuse/esp32h2/esp_efuse_utility.c 的烧录实现逐类解析了 Config、Flash、Identity、Jtag、Mac、Security、Usb、Vdd、Wdt 九大类字段。掌握摘要输出的读法就等于掌握了 ESP32-H2 芯片安全配置、唯一标识与硬件特性的第一手状态视图。【免费下载链接】esp-idfEspressif IoT Development Framework. Official development framework for Espressif SoCs.项目地址: https://gitcode.com/GitHub_Trending/es/esp-idf创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表