Chapter 2. API Reference
WR_DIS.FIELD_3,
FIELD_3
→
WR_DIS.FIELD_3.ALIAS,
FIELD_3 (just a alias for WR_DIS.FIELD_3)
→
WR_DIS.FIELD_4,
FIELD_4
→
The structured eFuse field looks like WR_DIS.RD_DIS where the dot points that this field belongs to the parent
field - WR_DIS and can not be out of the parent's range.
It is possible to use some levels of structured fields as WR_DIS.FIELD_2.B1 and B2. These fields should not be
crossed each other and should be in the range of two fields: WR_DIS and WR_DIS.FIELD_2.
It is possible to create aliases for fields with the same range, see WR_DIS.FIELD_3 and WR_DIS.FIELD_3.
ALIAS.
The IDF names for structured efuse fields should be unique. The efuse_table_gen tool will generate the
final names where the dot will be replaced by _. The names for using in IDF are ESP_EFUSE_WR_DIS,
ESP_EFUSE_WR_DIS_RD_DIS, ESP_EFUSE_WR_DIS_FIELD_2_B1, etc.
efuse_table_gen.py tool
The tool is designed to generate C-source files from CSV file and validate fields. First of all, the check is carried out
on the uniqueness of the names and overlaps of the field bits. If an additional custom file is used, it will be checked
with the existing common file (esp_efuse_table.csv). In case of errors, a message will be displayed and the string that
caused the error. C-source files contain structures of type esp_efuse_desc_t.
To generate a common files, use the following command idf.py efuse-common-table or:
cd
$IDF_PATH/components/efuse/
./efuse_table_gen.py esp32s2/esp_efuse_table.csv
After generation in the folder $IDF_PATH/components/efuse/esp32s2 create:
• esp_efuse_table.c file.
• In include folder esp_efuse_table.c file.
To generate a custom files, use the following command idf.py efuse-custom-table or:
cd
$IDF_PATH/components/efuse/
./efuse_table_gen.py esp32s2/esp_efuse_table.csv PROJECT_PATH/main/esp_efuse_
custom_table.csv
→
After generation in the folder PROJECT_PATH/main create:
• esp_efuse_custom_table.c file.
• In include folder esp_efuse_custom_table.c file.
To use the generated fields, you need to include two files:
#include
"esp_efuse.h"
#include
"esp_efuse_table.h" or "esp_efuse_custom_table.h"
Supported coding scheme
Coding schemes are used to protect against data corruption. ESP32-S2 supports two coding schemes:
• None. EFUSE_BLK0 is stored with four backups, meaning each bit is stored four times. This backup scheme
is automatically applied by the hardware and is not visible to software. EFUSE_BLK0 can be written many
times.
Espressif Systems
EFUSE_BLK0,
5,
EFUSE_BLK0,
5,
EFUSE_BLK0,
7,
807
Submit Document Feedback
(continued from previous page)
1,
Write protection
1,
Write protection
1,
Write protection
for␣
for␣
for␣
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?