Expand description
§eFuse (one-time programmable configuration)
§Overview
The efuse module provides functionality for reading eFuse data
from the chip, allowing access to various chip-specific
information such as:
- MAC address
- Chip revision
and more. It is useful for retrieving chip-specific configuration and identification data during runtime.
§Examples
§Reading interface MAC addresses
use esp_hal::efuse::{self, InterfaceMacAddress};
let mac = efuse::interface_mac_address(InterfaceMacAddress::Station);
println!("MAC: {mac}");
println!("MAC bytes: {:02x?}", mac.as_bytes());Structs§
- Chip
Revision - Represents the hardware revision.
- Efuse
Field unstable - The bit field for get access to efuse data
- MacAddress
- Hardware (MAC) address.
Enums§
- AdcCalib
Unit unstable - Selects which ADC we are interested in the efuse calibration data for
- Interface
MacAddress - Interface selection for
interface_mac_address. - SetMac
Error unstable - Error indicating issues with setting the MAC address.
Constants§
- ADC1_
CAL_ VOL_ ATTE N0 unstable - ADC1 calibration voltage at atten0
- ADC1_
CAL_ VOL_ ATTE N1 unstable - ADC1 calibration voltage at atten1
- ADC1_
CAL_ VOL_ ATTE N2 unstable - ADC1 calibration voltage at atten2
- ADC1_
CAL_ VOL_ ATTE N3 unstable - ADC1 calibration voltage at atten3
- ADC1_
INIT_ CODE_ ATTE N0 unstable - ADC1 init code at atten0
- ADC1_
INIT_ CODE_ ATTE N1 unstable - ADC1 init code at atten1
- ADC1_
INIT_ CODE_ ATTE N2 unstable - ADC1 init code at atten2
- ADC1_
INIT_ CODE_ ATTE N3 unstable - ADC1 init code at atten3
- BLK_
VERSION_ MAJOR unstable - BLK_VERSION_MAJOR of BLOCK2
- BLK_
VERSION_ MINOR unstable - BLK_VERSION_MINOR
- BLOCK_
KEY0 unstable - Key0 or user data
- BLOCK_
KEY1 unstable - Key1 or user data
- BLOCK_
KEY2 unstable - Key2 or user data
- BLOCK_
KEY3 unstable - Key3 or user data
- BLOCK_
KEY4 unstable - Key4 or user data
- BLOCK_
KEY5 unstable - Key5 or user data
- BLOCK_
SYS_ DATA2 unstable - System data part 2 (reserved)
- BLOCK_
USR_ DATA unstable - User data
- BTLC_
GPIO_ ENABLE unstable - Enable btlc gpio
- CUSTOM_
MAC unstable - Custom MAC address
- DIG_
DBIAS_ HVT unstable - BLOCK1 digital dbias when hvt
- DISABLE_
BLK_ VERSION_ MAJOR unstable - Disables check of blk version major
- DISABLE_
WAFER_ VERSION_ MAJOR unstable - Disables check of wafer version major
- DIS_
DIRECT_ BOOT unstable - Disable direct boot mode
- DIS_
DOWNLOAD_ ICACHE unstable - Set this bit to disable Icache in download mode (boot_mode[3:0] is 0; 1; 2; 3; 6; 7)
- DIS_
DOWNLOAD_ MANUAL_ ENCRYPT unstable - Set this bit to disable flash encryption when in download boot modes
- DIS_
DOWNLOAD_ MODE unstable - Set this bit to disable download mode (boot_mode[3:0] = 0; 1; 2; 3; 6; 7)
- DIS_
FORCE_ DOWNLOAD unstable - Set this bit to disable the function that forces chip into download mode
- DIS_
ICACHE unstable - Set this bit to disable Icache
- DIS_
PAD_ JTAG unstable - Set this bit to disable JTAG in the hard way. JTAG is disabled permanently
- DIS_
RTC_ RAM_ BOOT unstable - Set this bit to disable boot from RTC RAM
- DIS_
TWAI unstable - Set this bit to disable CAN function
- DIS_
USB_ JTAG unstable - Set this bit to disable function of usb switch to jtag in module of usb device
- DIS_
USB_ SERIAL_ JTAG unstable - USB-Serial-JTAG
- DIS_
USB_ SERIAL_ JTAG_ DOWNLOAD_ MODE unstable - Disable UART download mode through USB-Serial-JTAG
- DIS_
USB_ SERIAL_ JTAG_ ROM_ PRINT unstable - USB printing
- ENABLE_
SECURITY_ DOWNLOAD unstable - Set this bit to enable secure UART download mode
- ERR_
RST_ ENABLE unstable - Use BLOCK0 to check error record registers
- FLASH_
CAP unstable - Flash capacity
- FLASH_
ECC_ EN unstable - Set 1 to enable ECC for flash boot
- FLASH_
ECC_ MODE unstable - ECC mode in ROM
- FLASH_
PAGE_ SIZE unstable - Set Flash page size
- FLASH_
TEMP unstable - Flash temperature
- FLASH_
TPUW unstable - Configures flash waiting time after power-up; in unit of ms. If the value is less than 15; the waiting time is the configurable value; Otherwise; the waiting time is twice the configurable value
- FLASH_
TYPE unstable - Maximum lines of SPI flash
- FLASH_
VENDOR unstable - Flash vendor
- FORCE_
SEND_ RESUME unstable - Set this bit to force ROM code to send a resume command during SPI boot
- JTAG_
SEL_ ENABLE unstable - Set this bit to enable selection between usb_to_jtag and pad_to_jtag through strapping gpio10 when both reg_dis_usb_jtag and reg_dis_pad_jtag are equal to 0
- KEY_
PURPOSE_ 0 unstable - Purpose of Key0
- KEY_
PURPOSE_ 1 unstable - Purpose of Key1
- KEY_
PURPOSE_ 2 unstable - Purpose of Key2
- KEY_
PURPOSE_ 3 unstable - Purpose of Key3
- KEY_
PURPOSE_ 4 unstable - Purpose of Key4
- KEY_
PURPOSE_ 5 unstable - Purpose of Key5
- K_
DIG_ LDO unstable - BLOCK1 K_DIG_LDO
- K_
RTC_ LDO unstable - BLOCK1 K_RTC_LDO
- MAC0
unstable - MAC address
- MAC1
unstable - MAC address
- OCODE
unstable - ADC OCode
- OPTIONAL_
UNIQUE_ ID unstable - Optional unique 128-bit ID
- PIN_
POWER_ SELECTION unstable - GPIO33-GPIO37 power supply selection in ROM code
- PKG_
VERSION unstable - Package version
- POWERGLITCH_
EN unstable - Set this bit to enable power glitch function
- POWER_
GLITCH_ DSENSE unstable - Sample delay configuration of power glitch
- RD_DIS
unstable - Disable reading from BlOCK4-10
- RESERVED_
0_ 158 unstable - reserved
- RESERVED_
0_ 162 unstable - reserved
- RESERVED_
1_ 131 unstable - reserved
- RESERVED_
1_ 180 unstable - reserved
- RESERVED_
1_ 186 unstable - reserved
- RESERVED_
2_ 130 unstable - reserved
- RESERVED_
2_ 228 unstable - reserved
- RESERVED_
3_ 192 unstable - reserved
- RESERVED_
3_ 248 unstable - reserved
- RPT4_
RESERVE D0 unstable - Reserved (used for four backups method)
- RPT4_
RESERVE D2 unstable - Reserved (used for four backups method)
- RPT4_
RESERVE D3 unstable - Reserved (used for four backups method)
- RPT4_
RESERVE D6 unstable - Reserved (used for four backups method)
- SECURE_
BOOT_ AGGRESSIVE_ REVOKE unstable - Set this bit to enable revoking aggressive secure boot
- SECURE_
BOOT_ EN unstable - Set this bit to enable secure boot
- SECURE_
BOOT_ KEY_ REVOK E0 unstable - Revoke 1st secure boot key
- SECURE_
BOOT_ KEY_ REVOK E1 unstable - Revoke 2nd secure boot key
- SECURE_
BOOT_ KEY_ REVOK E2 unstable - Revoke 3rd secure boot key
- SECURE_
VERSION unstable - Secure version (used by ESP-IDF anti-rollback feature)
- SOFT_
DIS_ JTAG unstable - Set these bits to disable JTAG in the soft way (odd number 1 means disable ). JTAG can be enabled in HMAC module
- SPI_
BOOT_ CRYPT_ CNT unstable - Enables flash encryption when 1 or 3 bits are set and disables otherwise
- SPI_
PAD_ CONFIG_ CLK unstable - SPI PAD CLK
- SPI_
PAD_ CONFIG_ CS unstable - SPI PAD CS
- SPI_
PAD_ CONFIG_ D unstable - SPI PAD D(D0)
- SPI_
PAD_ CONFIG_ D4 unstable - SPI PAD D4
- SPI_
PAD_ CONFIG_ D5 unstable - SPI PAD D5
- SPI_
PAD_ CONFIG_ D6 unstable - SPI PAD D6
- SPI_
PAD_ CONFIG_ D7 unstable - SPI PAD D7
- SPI_
PAD_ CONFIG_ DQS unstable - SPI PAD DQS
- SPI_
PAD_ CONFIG_ HD unstable - SPI PAD HD(D3)
- SPI_
PAD_ CONFIG_ Q unstable - SPI PAD Q(D1)
- SPI_
PAD_ CONFIG_ WP unstable - SPI PAD WP(D2)
- TEMP_
CALIB unstable - Temperature calibration data
- THRES_
HVT unstable - BLOCK1 pvt threshold when hvt
- UART_
PRINT_ CONTROL unstable - Set the default UARTboot message output mode
- USB_
DREFH unstable - Controls single-end input threshold vrefh; 1.76 V to 2 V with step of 80 mV; stored in eFuse
- USB_
DREFL unstable - Controls single-end input threshold vrefl; 0.8 V to 1.04 V with step of 80 mV; stored in eFuse
- USB_
EXCHG_ PINS unstable - Set this bit to exchange USB D+ and D- pins
- VDD_
SPI_ AS_ GPIO unstable - Set this bit to vdd spi pin function as gpio
- V_
DIG_ DBIA S20 unstable - BLOCK1 voltage of digital dbias20
- V_
RTC_ DBIA S20 unstable - BLOCK1 voltage of rtc dbias20
- WAFER_
VERSION_ MAJOR unstable - WAFER_VERSION_MAJOR
- WAFER_
VERSION_ MINOR_ HI unstable - WAFER_VERSION_MINOR most significant bit
- WAFER_
VERSION_ MINOR_ LO unstable - WAFER_VERSION_MINOR least significant bits
- WDT_
DELAY_ SEL unstable - RTC watchdog timeout threshold; in unit of slow clock cycle
- WR_DIS
unstable - Disable programming of individual eFuses
Functions§
- base_
mac_ address unstable - Returns the base MAC address programmed into eFuse during manufacturing.
- block_
version unstable - Get efuse block version
- chip_
revision - Returns the hardware revision.
- flash_
encryption unstable - Get status of SPI boot encryption.
- interface_
mac_ address - Returns the MAC address for a specific interface, derived from the base MAC.
- major_
chip_ version unstable - Returns the major hardware revision
- minor_
chip_ version unstable - Returns the minor hardware revision
- override_
mac_ address unstable - Overrides the base MAC address used by
interface_mac_address. - read_
bit unstable - Read bit value.
- read_
field_ le unstable - Read field value in a little-endian order
- rtc_
calib_ cal_ code unstable - Get ADC reference point digital code for specified attenuation
- rtc_
calib_ cal_ mv unstable - Get ADC reference point voltage for specified attenuation in millivolts
- rtc_
calib_ init_ code unstable - Get ADC initial code for specified attenuation from efuse
- rtc_
calib_ version unstable - Get version of RTC calibration block
- rwdt_
multiplier unstable - Get the multiplier for the timeout value of the RWDT STAGE 0 register.