mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
efuse: Add CUSTOM_MAC address for ESP32-C3/-S2/-S3/-H2
This commit is contained in:
@@ -50,6 +50,8 @@
|
||||
OPTIONAL_UNIQUE_ID (BLOCK2)(0 errors): Optional unique 128-bit ID
|
||||
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
|
||||
BLOCK2_VERSION (BLOCK2) Version of BLOCK2 = No calibration R/W (0b000)
|
||||
CUSTOM_MAC (BLOCK3) Custom MAC Address
|
||||
= 00:00:00:00:00:00 (OK) R/W
|
||||
|
||||
Jtag Config fuses:
|
||||
JTAG_SEL_ENABLE (BLOCK0) Set this bit to enable selection between usb_to_jt = False R/W (0b0)
|
||||
|
@@ -66,6 +66,8 @@
|
||||
OPTIONAL_UNIQUE_ID (BLOCK2)(0 errors): Optional unique 128-bit ID
|
||||
= 7d 33 b8 bb 0b 13 b3 c8 71 37 0e e8 7c ab d5 92 R/W
|
||||
BLOCK2_VERSION (BLOCK2) Version of BLOCK2 = With calibration R/W (0b001)
|
||||
CUSTOM_MAC (BLOCK3) Custom MAC Address
|
||||
= 00:00:00:00:00:00 (OK) R/W
|
||||
|
||||
Security fuses:
|
||||
SOFT_DIS_JTAG (BLOCK0) Software disables JTAG. When software disabled, JT = False R/W (0b0)
|
||||
|
@@ -66,6 +66,8 @@
|
||||
OPTIONAL_UNIQUE_ID (BLOCK2)(0 errors): Optional unique 128-bit ID
|
||||
= 7d 33 b8 bb 0b 13 b3 c8 71 37 0e e8 7c ab d5 92 R/W
|
||||
BLOCK2_VERSION (BLOCK2) Version of BLOCK2 = With calibration R/W (0b001)
|
||||
CUSTOM_MAC (BLOCK3) Custom MAC Address
|
||||
= 00:00:00:00:00:00 (OK) R/W
|
||||
|
||||
Security fuses:
|
||||
SOFT_DIS_JTAG (BLOCK0) Software disables JTAG. When software disabled, JT = False R/W (0b000)
|
||||
|
@@ -102,14 +102,14 @@ The custom base MAC addresses should be allocated such that derived MAC addresse
|
||||
|
||||
It is also possible to call the function :cpp:func:`esp_netif_set_mac` to set the specific MAC used by a network interface, after network initialization. It's recommended to use the Base MAC approach documented here instead, to avoid the possibility of the original MAC address briefly appearing on the network before it is changed.
|
||||
|
||||
.. This API is ESP32-only, see IDF-1326
|
||||
|
||||
Custom MAC address in eFuse
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
When reading custom MAC addresses from eFuse, ESP-IDF provides a helper function :cpp:func:`esp_efuse_mac_get_custom`. This loads the MAC address from eFuse BLK3. This function assumes that the custom base MAC address is stored in the following format:
|
||||
|
||||
.. only:: esp32
|
||||
|
||||
Custom MAC address in eFuse
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
When reading custom MAC addresses from eFuse, ESP-IDF provides a helper function :cpp:func:`esp_efuse_mac_get_custom`. This loads the MAC address from eFuse BLK3. This function assumes that the custom base MAC address is stored in the following format:
|
||||
|
||||
+-----------------+-----------+---------------+------------------------------+
|
||||
| Field | # of bits | Range of bits | Notes |
|
||||
+=================+===========+===============+==============================+
|
||||
@@ -122,7 +122,25 @@ The custom base MAC addresses should be allocated such that derived MAC addresse
|
||||
| MAC address CRC | 8 | 7:0 | CRC-8-CCITT, polynomial 0x07 |
|
||||
+-----------------+-----------+---------------+------------------------------+
|
||||
|
||||
Once MAC address has been obtained using :cpp:func:`esp_efuse_mac_get_custom`, call :cpp:func:`esp_base_mac_addr_set` to set this MAC address as base MAC address.
|
||||
.. note::
|
||||
|
||||
If the 3/4 coding scheme is enabled, all eFuse fields in this block must be burnt at the same time.
|
||||
|
||||
.. only:: not esp32
|
||||
|
||||
+-----------------+-----------+---------------+
|
||||
| Field | # of bits | Range of bits |
|
||||
+=================+===========+===============+
|
||||
| MAC address | 48 | 200:248 |
|
||||
+-----------------+-----------+---------------+
|
||||
|
||||
.. note::
|
||||
|
||||
The eFuse BLK3 uses RS-coding during a burn operation it means that all eFuse fields in this block must be burnt at the same time.
|
||||
|
||||
Once MAC address has been obtained using :cpp:func:`esp_efuse_mac_get_custom`, call :cpp:func:`esp_base_mac_addr_set` to set this MAC address as base MAC address.
|
||||
|
||||
|
||||
|
||||
.. _local-mac-addresses:
|
||||
|
||||
|
Reference in New Issue
Block a user