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 N3 unstable - ADC1 calibration voltage at atten3
- ADC1_
INIT_ CODE_ ATTE N0 unstable - ADC1 init code at atten0
- ADC1_
INIT_ CODE_ ATTE N3 unstable - ADC1 init code at atten3
- ADC_
CALIBRATION_ 3 unstable - Store the bit [86:96] of ADC calibration data
- BLK2_
RESERVED_ DATA_ 0 unstable - Store the bit [0:20] of block2 reserved data
- BLK2_
RESERVED_ DATA_ 1 unstable - Store the bit [21:52] of block2 reserved data
- BLK_
VERSION_ MAJOR unstable - Major version of BLOCK2
- BLK_
VERSION_ MINOR unstable - Minor version of BLOCK2
- BLOCK_
KEY0 unstable - BLOCK_KEY0 - 256-bits. 256-bit key of Flash Encryption
- CUSTOM_
MAC unstable - Custom MAC address
- CUSTOM_
MAC_ USED unstable - True if MAC_CUSTOM is burned
- DIG_
DBIAS_ HVT unstable - BLOCK2 digital dbias when hvt
- DIG_
LDO_ ACT_ DBIA S26 unstable - BLOCK2 DIG_LDO_ACT_DBIAS26
- DIG_
LDO_ ACT_ STEP D10 unstable - BLOCK2 DIG_LDO_ACT_STEPD10
- DIG_
LDO_ SLP_ DBIA S2 unstable - BLOCK2 DIG_LDO_DBG0_DBIAS2
- DIG_
LDO_ SLP_ DBIA S26 unstable - BLOCK2 DIG_LDO_DBG0_DBIAS26
- 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 - This bit set means disable direct_boot mode
- DIS_
DOWNLOAD_ ICACHE unstable - The bit be set to disable icache in download mode
- DIS_
DOWNLOAD_ MANUAL_ ENCRYPT unstable - The bit be set to disable manual encryption
- DIS_
DOWNLOAD_ MODE unstable - Set this bit to disable download mode (boot_mode[3:0] = 0; 1; 2; 4; 5; 6; 7)
- DIS_
PAD_ JTAG unstable - Set this bit to disable pad jtag
- ENABLE_
SECURITY_ DOWNLOAD unstable - Set this bit to enable secure UART download mode
- 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
- FORCE_
SEND_ RESUME unstable - Set this bit to force ROM code to send a resume command during SPI boot
- MAC0
unstable - MAC address
- MAC1
unstable - MAC address
- OCODE
unstable - OCode
- PKG_
VERSION unstable - EFUSE_PKG_VERSION
- RD_DIS
unstable - Disable reading from BlOCK3
- RESERVED_
0_ 8 unstable - RESERVED_
0_ 61 unstable - reserved
- RESERVED_
1_ 48 unstable - reserved
- RESERVED_
2_ 171 unstable - reserved
- RTC_
LDO_ ACT_ DBIA S13 unstable - BLOCK2 DIG_LDO_ACT_DBIAS13
- RTC_
LDO_ ACT_ DBIA S31 unstable - BLOCK2 DIG_LDO_ACT_DBIAS31
- RTC_
LDO_ SLP_ DBIA S13 unstable - BLOCK2 DIG_LDO_SLP_DBIAS13
- RTC_
LDO_ SLP_ DBIA S29 unstable - BLOCK2 DIG_LDO_SLP_DBIAS29
- RTC_
LDO_ SLP_ DBIA S31 unstable - BLOCK2 DIG_LDO_SLP_DBIAS31
- SECURE_
BOOT_ EN unstable - The bit be set to enable secure boot
- SECURE_
VERSION unstable - Secure version for anti-rollback
- SPI_
BOOT_ CRYPT_ CNT unstable - Enables flash encryption when 1 or 3 bits are set and disables otherwise
- SYSTEM_
DATA2 unstable - Stores the bits [64:87] of system data
- TEMP_
CALIB unstable - Temperature calibration data
- UART_
PRINT_ CONTROL unstable - Set the default UARTboot message output mode
- WAFER_
VERSION_ MAJOR unstable - WAFER_VERSION_MAJOR
- WAFER_
VERSION_ MINOR unstable - WAFER_VERSION_MINOR
- WDT_
DELAY_ SEL unstable - RTC watchdog timeout threshold; in unit of slow clock cycle
- WR_DIS
unstable - Disable programming of individual eFuses
- XTS_
KEY_ LENGTH_ 256 unstable - Flash encryption key length
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.