Skip to main content

Module efuse

Module efuse 

Source
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§

ChipRevision
Represents the hardware revision.
EfuseFieldunstable
The bit field for get access to efuse data
MacAddress
Hardware (MAC) address.

Enums§

AdcCalibUnitunstable
Selects which ADC we are interested in the efuse calibration data for
InterfaceMacAddress
Interface selection for interface_mac_address.
SetMacErrorunstable
Error indicating issues with setting the MAC address.

Constants§

ADC1_CAL_VOL_ATTEN0unstable
ADC1 calibration voltage at atten0
ADC1_CAL_VOL_ATTEN3unstable
ADC1 calibration voltage at atten3
ADC1_INIT_CODE_ATTEN0unstable
ADC1 init code at atten0
ADC1_INIT_CODE_ATTEN3unstable
ADC1 init code at atten3
ADC_CALIBRATION_3unstable
Store the bit [86:96] of ADC calibration data
BLK2_RESERVED_DATA_0unstable
Store the bit [0:20] of block2 reserved data
BLK2_RESERVED_DATA_1unstable
Store the bit [21:52] of block2 reserved data
BLK_VERSION_MAJORunstable
Major version of BLOCK2
BLK_VERSION_MINORunstable
Minor version of BLOCK2
BLOCK_KEY0unstable
BLOCK_KEY0 - 256-bits. 256-bit key of Flash Encryption
CUSTOM_MACunstable
Custom MAC address
CUSTOM_MAC_USEDunstable
True if MAC_CUSTOM is burned
DIG_DBIAS_HVTunstable
BLOCK2 digital dbias when hvt
DIG_LDO_ACT_DBIAS26unstable
BLOCK2 DIG_LDO_ACT_DBIAS26
DIG_LDO_ACT_STEPD10unstable
BLOCK2 DIG_LDO_ACT_STEPD10
DIG_LDO_SLP_DBIAS2unstable
BLOCK2 DIG_LDO_DBG0_DBIAS2
DIG_LDO_SLP_DBIAS26unstable
BLOCK2 DIG_LDO_DBG0_DBIAS26
DISABLE_BLK_VERSION_MAJORunstable
Disables check of blk version major
DISABLE_WAFER_VERSION_MAJORunstable
Disables check of wafer version major
DIS_DIRECT_BOOTunstable
This bit set means disable direct_boot mode
DIS_DOWNLOAD_ICACHEunstable
The bit be set to disable icache in download mode
DIS_DOWNLOAD_MANUAL_ENCRYPTunstable
The bit be set to disable manual encryption
DIS_DOWNLOAD_MODEunstable
Set this bit to disable download mode (boot_mode[3:0] = 0; 1; 2; 4; 5; 6; 7)
DIS_PAD_JTAGunstable
Set this bit to disable pad jtag
ENABLE_SECURITY_DOWNLOADunstable
Set this bit to enable secure UART download mode
FLASH_TPUWunstable
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_RESUMEunstable
Set this bit to force ROM code to send a resume command during SPI boot
MAC0unstable
MAC address
MAC1unstable
MAC address
OCODEunstable
OCode
PKG_VERSIONunstable
EFUSE_PKG_VERSION
RD_DISunstable
Disable reading from BlOCK3
RESERVED_0_8unstable
RESERVED_0_61unstable
reserved
RESERVED_1_48unstable
reserved
RESERVED_2_171unstable
reserved
RTC_LDO_ACT_DBIAS13unstable
BLOCK2 DIG_LDO_ACT_DBIAS13
RTC_LDO_ACT_DBIAS31unstable
BLOCK2 DIG_LDO_ACT_DBIAS31
RTC_LDO_SLP_DBIAS13unstable
BLOCK2 DIG_LDO_SLP_DBIAS13
RTC_LDO_SLP_DBIAS29unstable
BLOCK2 DIG_LDO_SLP_DBIAS29
RTC_LDO_SLP_DBIAS31unstable
BLOCK2 DIG_LDO_SLP_DBIAS31
SECURE_BOOT_ENunstable
The bit be set to enable secure boot
SECURE_VERSIONunstable
Secure version for anti-rollback
SPI_BOOT_CRYPT_CNTunstable
Enables flash encryption when 1 or 3 bits are set and disables otherwise
SYSTEM_DATA2unstable
Stores the bits [64:87] of system data
TEMP_CALIBunstable
Temperature calibration data
UART_PRINT_CONTROLunstable
Set the default UARTboot message output mode
WAFER_VERSION_MAJORunstable
WAFER_VERSION_MAJOR
WAFER_VERSION_MINORunstable
WAFER_VERSION_MINOR
WDT_DELAY_SELunstable
RTC watchdog timeout threshold; in unit of slow clock cycle
WR_DISunstable
Disable programming of individual eFuses
XTS_KEY_LENGTH_256unstable
Flash encryption key length

Functions§

base_mac_addressunstable
Returns the base MAC address programmed into eFuse during manufacturing.
block_versionunstable
Get efuse block version
chip_revision
Returns the hardware revision.
flash_encryptionunstable
Get status of SPI boot encryption.
interface_mac_address
Returns the MAC address for a specific interface, derived from the base MAC.
major_chip_versionunstable
Returns the major hardware revision
minor_chip_versionunstable
Returns the minor hardware revision
override_mac_addressunstable
Overrides the base MAC address used by interface_mac_address.
read_bitunstable
Read bit value.
read_field_leunstable
Read field value in a little-endian order
rtc_calib_cal_codeunstable
Get ADC reference point digital code for specified attenuation
rtc_calib_cal_mvunstable
Get ADC reference point voltage for specified attenuation in millivolts
rtc_calib_init_codeunstable
Get ADC initial code for specified attenuation from efuse
rtc_calib_versionunstable
Get version of RTC calibration block
rwdt_multiplierunstable
Get the multiplier for the timeout value of the RWDT STAGE 0 register.