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§
- Interface
MacAddress - Interface selection for
interface_mac_address. - SetMac
Error unstable - Error indicating issues with setting the MAC address.
Constants§
- ADC_
CALIB unstable - 4 bit of ADC calibration
- BLK_
VERSION_ MAJOR unstable - BLK_VERSION_MAJOR
- BLK_
VERSION_ MINOR unstable - BLK_VERSION_MINOR of BLOCK2
- BLOC
K0_ VERSION unstable - BLOCK0 efuse version
- 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
- CUSTOM_
MAC unstable - Custom MAC
- DISABLE_
BLK_ VERSION_ MAJOR unstable - Disables check of blk version major
- DISABLE_
WAFER_ VERSION_ MAJOR unstable - Disables check of wafer version major
- DIS_
BOOT_ REMAP unstable - Disables capability to Remap RAM to ROM address space
- DIS_
DCACHE unstable - Set this bit to disable Dcache
- DIS_
DOWNLOAD_ DCACHE unstable - Disables Dcache when SoC is in Download mode
- DIS_
DOWNLOAD_ ICACHE unstable - Disables Icache when SoC is in Download mode
- DIS_
DOWNLOAD_ MANUAL_ ENCRYPT unstable - Disables flash encryption when in download boot modes
- DIS_
DOWNLOAD_ MODE unstable - Set this bit to disable all download boot modes
- 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_
LEGACY_ SPI_ BOOT unstable - Set this bit to disable Legacy SPI boot mode
- DIS_
RTC_ RAM_ BOOT unstable - Reserved
- DIS_
TWAI unstable - Set this bit to disable the TWAI Controller function
- DIS_USB
unstable - Set this bit to disable USB OTG function
- DIS_
USB_ DOWNLOAD_ MODE unstable - Set this bit to disable use of USB OTG in UART download boot mode
- ENABLE_
SECURITY_ DOWNLOAD unstable - Set this bit to enable secure UART download mode (read/write flash only)
- FLASH_
TPUW unstable - Configures flash startup delay after SoC power-up; in unit of (ms/2). When the value is 15; delay is 7.5 ms
- FLASH_
TYPE unstable - SPI flash type
- FLASH_
VERSION unstable - Flash version
- FORCE_
SEND_ RESUME unstable - If set; forces ROM code to send an SPI flash resume command during SPI boot
- HARD_
DIS_ JTAG unstable - Hardware disables JTAG permanently
- 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
- KEY_
PURPOSE_ 6 unstable - Purpose of KEY6
- MAC0
unstable - MAC address
- MAC1
unstable - MAC address
- OPTIONAL_
UNIQUE_ ID unstable - Optional unique 128-bit ID
- PIN_
POWER_ SELECTION unstable - Set default power supply for GPIO33-GPIO37; set when SPI flash is initialized
- PKG_
VERSION unstable - Package version
- PSRAM_
VERSION unstable - PSRAM version
- RD_DIS
unstable - Disable reading from BlOCK4-10
- RESERVED_
0_ 162 unstable - reserved
- RESERVED_
1_ 123 unstable - reserved
- RESERVED_
1_ 135 unstable - reserved
- RESERVED_
3_ 192 unstable - reserved
- RESERVED_
3_ 248 unstable - reserved
- RPT4_
RESERVE D1 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 D5 unstable - Reserved (used for four backups method)
- RTCCALIB_
V1IDX_ A10H unstable - RTCCALIB_
V1IDX_ A10L unstable - RTCCALIB_
V1IDX_ A11H unstable - RTCCALIB_
V1IDX_ A11L unstable - RTCCALIB_
V1IDX_ A12H unstable - RTCCALIB_
V1IDX_ A12L unstable - RTCCALIB_
V1IDX_ A13H unstable - RTCCALIB_
V1IDX_ A13L unstable - RTCCALIB_
V1IDX_ A20H unstable - RTCCALIB_
V1IDX_ A20L unstable - RTCCALIB_
V1IDX_ A21H unstable - RTCCALIB_
V1IDX_ A21L unstable - RTCCALIB_
V1IDX_ A22H unstable - RTCCALIB_
V1IDX_ A22L unstable - RTCCALIB_
V1IDX_ A23H unstable - RTCCALIB_
V1IDX_ A23L unstable - SECURE_
BOOT_ AGGRESSIVE_ REVOKE unstable - Set this bit to enable aggressive secure boot key revocation mode
- 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 - Software disables JTAG. When software disabled; JTAG can be activated temporarily by HMAC peripheral
- SPI_
BOOT_ CRYPT_ CNT unstable - Enables flash encryption when 1 or 3 bits are set and disabled otherwise
- SPI_
PAD_ CONFIG_ CLK unstable - SPI_PAD_configure CLK
- SPI_
PAD_ CONFIG_ CS unstable - SPI_PAD_configure CS
- SPI_
PAD_ CONFIG_ D unstable - SPI_PAD_configure D(D0)
- SPI_
PAD_ CONFIG_ D4 unstable - SPI_PAD_configure D4
- SPI_
PAD_ CONFIG_ D5 unstable - SPI_PAD_configure D5
- SPI_
PAD_ CONFIG_ D6 unstable - SPI_PAD_configure D6
- SPI_
PAD_ CONFIG_ D7 unstable - SPI_PAD_configure D7
- SPI_
PAD_ CONFIG_ DQS unstable - SPI_PAD_configure DQS
- SPI_
PAD_ CONFIG_ HD unstable - SPI_PAD_configure HD(D3)
- SPI_
PAD_ CONFIG_ Q unstable - SPI_PAD_configure Q(D1)
- SPI_
PAD_ CONFIG_ WP unstable - SPI_PAD_configure WP(D2)
- SYS_
DATA_ PART0_ 2 unstable - Stores the second part of the zeroth part of system data
- TEMP_
CALIB unstable - Temperature calibration data
- UART_
PRINT_ CHANNEL unstable - Selects the default UART for printing boot messages
- UART_
PRINT_ CONTROL unstable - Set the default UART boot 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
- USB_
EXT_ PHY_ ENABLE unstable - Set this bit to enable external USB PHY
- USB_
FORCE_ NOPERSIST unstable - If set; forces USB BVALID to 1
- VDD_
SPI_ DCAP unstable - Prevents SPI regulator from overshoot
- VDD_
SPI_ DCURLIM unstable - Tunes the current limit threshold of SPI regulator when tieh=0; about 800 mA/(8+d)
- VDD_
SPI_ DREFH unstable - SPI regulator high voltage reference
- VDD_
SPI_ DREFL unstable - SPI regulator low voltage reference
- VDD_
SPI_ DREFM unstable - SPI regulator medium voltage reference
- VDD_
SPI_ ENCURLIM unstable - Set SPI regulator to 1 to enable output current limit
- VDD_
SPI_ EN_ INIT unstable - Set SPI regulator to 0 to configure init[1:0]=0
- VDD_
SPI_ FORCE unstable - Set this bit to use XPD_VDD_PSI_REG and VDD_SPI_TIEH to configure VDD_SPI LDO
- VDD_
SPI_ INIT unstable - Adds resistor from LDO output to ground
- VDD_
SPI_ MODECURLIM unstable - SPI regulator switches current limit mode
- VDD_
SPI_ TIEH unstable - If VDD_SPI_FORCE is 1; determines VDD_SPI voltage
- VDD_
SPI_ XPD unstable - If VDD_SPI_FORCE is 1; this value determines if the VDD_SPI regulator is powered on
- 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.
- 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
- rwdt_
multiplier unstable - Get the multiplier for the timeout value of the RWDT STAGE 0 register.