diff --git a/components/efuse/esp32h2/esp_efuse_table.c b/components/efuse/esp32h2/esp_efuse_table.c index 540e2e050a..a036a9bffd 100644 --- a/components/efuse/esp32h2/esp_efuse_table.c +++ b/components/efuse/esp32h2/esp_efuse_table.c @@ -9,7 +9,7 @@ #include #include "esp_efuse_table.h" -// md5_digest_table a007943ae37fe41884a23d505a6e7dbb +// md5_digest_table 6aaac59bd3f6d31bea4aef43b1f0d78a // This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY. // If you want to change some fields, you need to change esp_efuse_table.csv file // then run `efuse_common_table` or `efuse_custom_table` command it will generate this file. @@ -349,8 +349,8 @@ static const esp_efuse_desc_t MAC_FACTORY[] = { }; static const esp_efuse_desc_t MAC_EXT[] = { - {EFUSE_BLK1, 123, 8}, // Factory MAC addr [6], - {EFUSE_BLK1, 131, 8}, // Factory MAC addr [7], + {EFUSE_BLK1, 123, 8}, // Extend MAC addr [0], + {EFUSE_BLK1, 131, 8}, // Extend MAC addr [1], }; static const esp_efuse_desc_t SPI_PAD_CONFIG_CLK[] = { @@ -913,8 +913,8 @@ const esp_efuse_desc_t* ESP_EFUSE_MAC_FACTORY[] = { }; const esp_efuse_desc_t* ESP_EFUSE_MAC_EXT[] = { - &MAC_EXT[6], // Factory MAC addr [6] - &MAC_EXT[7], // Factory MAC addr [7] + &MAC_EXT[0], // Extend MAC addr [0] + &MAC_EXT[1], // Extend MAC addr [1] NULL }; diff --git a/components/efuse/esp32h2/esp_efuse_table.csv b/components/efuse/esp32h2/esp_efuse_table.csv index cab21a1830..045969533f 100644 --- a/components/efuse/esp32h2/esp_efuse_table.csv +++ b/components/efuse/esp32h2/esp_efuse_table.csv @@ -115,8 +115,8 @@ , EFUSE_BLK1, 16, 8, Factory MAC addr [3] , EFUSE_BLK1, 8, 8, Factory MAC addr [4] , EFUSE_BLK1, 0, 8, Factory MAC addr [5] - MAC_EXT, EFUSE_BLK1, 123, 8, Factory MAC addr [6] - , EFUSE_BLK1, 131, 8, Factory MAC addr [7] + MAC_EXT, EFUSE_BLK1, 123, 8, Extend MAC addr [0] + , EFUSE_BLK1, 131, 8, Extend MAC addr [1] SPI_PAD_CONFIG_CLK, EFUSE_BLK1, 48, 6, SPI_PAD_configure CLK SPI_PAD_CONFIG_Q_D1, EFUSE_BLK1, 54, 6, SPI_PAD_configure Q(D1) SPI_PAD_CONFIG_D_D0, EFUSE_BLK1, 60, 6, SPI_PAD_configure D(D0) diff --git a/components/efuse/esp32h2/include/esp_efuse_table.h b/components/efuse/esp32h2/include/esp_efuse_table.h index a35a2ea1de..9762dad0b3 100644 --- a/components/efuse/esp32h2/include/esp_efuse_table.h +++ b/components/efuse/esp32h2/include/esp_efuse_table.h @@ -9,7 +9,7 @@ extern "C" { #endif -// md5_digest_table a007943ae37fe41884a23d505a6e7dbb +// md5_digest_table 6aaac59bd3f6d31bea4aef43b1f0d78a // This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY. // If you want to change some fields, you need to change esp_efuse_table.csv file // then run `efuse_common_table` or `efuse_custom_table` command it will generate this file. diff --git a/components/esp_hw_support/mac_addr.c b/components/esp_hw_support/mac_addr.c index be80a98d6e..65f7db4f7e 100644 --- a/components/esp_hw_support/mac_addr.c +++ b/components/esp_hw_support/mac_addr.c @@ -75,8 +75,9 @@ esp_err_t esp_efuse_mac_get_custom(uint8_t *mac) return ESP_ERR_INVALID_MAC; } #if (ESP_MAC_ADDRESS_LEN == 8) - err = esp_efuse_read_field_blob(ESP_EFUSE_MAC_EXT, &mac[6], ESP_MAC_ADDRESS_LEN - size); + err = esp_efuse_read_field_blob(ESP_EFUSE_MAC_EXT, &mac[6], ESP_MAC_ADDRESS_LEN * 8 - size_bits); if (err != ESP_OK) { + ESP_LOGE(TAG, "Reading MAC_EXT failed, error=%d", err); return err; } #endif @@ -111,8 +112,9 @@ esp_err_t esp_efuse_mac_get_default(uint8_t *mac) return err; } #if (ESP_MAC_ADDRESS_LEN == 8) - err = esp_efuse_read_field_blob(ESP_EFUSE_MAC_EXT, &mac[6], ESP_MAC_ADDRESS_LEN - size_bits / 8); + err = esp_efuse_read_field_blob(ESP_EFUSE_MAC_EXT, &mac[6], ESP_MAC_ADDRESS_LEN * 8 - size_bits); if (err != ESP_OK) { + ESP_LOGE(TAG, "Reading MAC_EXT failed, error=%d", err); return err; } #endif