feat(efuse): Support efuse token dump

- efuse token dump is compatible with espefuse tool
- EFSW dump can be burned on chip with esp_efuse_token_burn()
This commit is contained in:
Konstantin Kondrashov
2026-06-03 13:19:59 +03:00
parent d4c8d211e1
commit 885097762f
31 changed files with 1844 additions and 65 deletions
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "soc/soc_caps.h"
#include "hal/efuse_ll.h"
#include_next "hal/efuse_hal.h"
#ifdef __cplusplus
+23 -1
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -121,6 +121,28 @@ __attribute__((always_inline)) static inline uint32_t efuse_ll_get_ocode(void)
return (((EFUSE.rd_sys_part1_data4.val >> 16) & 0x7) << 4) + (EFUSE.rd_sys_part1_data4.val & 0xF);
}
__attribute__((always_inline)) static inline uint32_t efuse_ll_get_coding_error(unsigned index)
{
switch (index) {
case 0:
return EFUSE.rd_repeat_err0.val;
case 1:
return EFUSE.rd_repeat_err1.val;
case 2:
return EFUSE.rd_repeat_err2.val;
case 3:
return EFUSE.rd_repeat_err3.val;
case 4:
return EFUSE.rd_repeat_err4.val;
case 5:
return EFUSE.rd_rs_err0.val;
case 6:
return EFUSE.rd_rs_err1.val;
default:
return 0;
}
}
/******************* eFuse control functions *************************/
__attribute__((always_inline)) static inline bool efuse_ll_get_read_cmd(void)