@oldndumb, I love your sketch, but do not yet understand how it works. Could you maybe explain? Below what I was using to read
Vref:
Code: Select all
#include "esp_adc_cal.h"
void setup() {
Serial.begin(115200);
while (!Serial) {}
//Read eFuse Voltage Refference
esp_adc_cal_characteristics_t adc_chars; //declaring ADC calibration variable adc_chars
esp_adc_cal_characterize(ADC_UNIT_1, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12, 1100, &adc_chars); //characterizing the ADC calibration function ADC_UNIT_1 or ADC_UNIT_2
Serial.println(); Serial.print("eFuse-Vref:"); Serial.print(adc_chars.vref); Serial.println(); //reading the actual internal refference voltage
}
void loop() {
}
Below one return value that different for each device:
eFuse-Vref:1086
And for the MAC, I was reading registers before I found your code:
Code: Select all
#include <soc/efuse_reg.h>
void setup() {
Serial.begin(115200);
while (!Serial) {}
//Read all registers of eFuse Block 0
uint32_t blk0reg0 = REG_READ(EFUSE_BLK0_RDATA0_REG), blk0reg1 = REG_READ(EFUSE_BLK0_RDATA1_REG), blk0reg2 = REG_READ(EFUSE_BLK0_RDATA2_REG), blk0reg3 = REG_READ(EFUSE_BLK0_RDATA3_REG),
blk0reg4 = REG_READ(EFUSE_BLK0_RDATA4_REG), blk0reg5 = REG_READ(EFUSE_BLK0_RDATA5_REG), blk0reg6 = REG_READ(EFUSE_BLK0_RDATA6_REG); //blk0reg7 = REG_READ(EFUSE_BLK0_RDATA7_REG) did not work
//Print all registers of eFuse Block 0
Serial.println(); Serial.println();
Serial.print("Block 0 non HEX: "); Serial.print(blk0reg0); Serial.print(blk0reg1); Serial.print(blk0reg2);
Serial.print(blk0reg3); Serial.print(blk0reg4); Serial.print(blk0reg5); Serial.print(blk0reg6); Serial.println(); //Serial.print(blk0reg7)
//HEX Print all registers of eFuse Block 0
Serial.println("Block 0 HEX:");
Serial.print("Block 0, Register 0: "); Serial.println(blk0reg0, HEX);
Serial.print("Block 0, Register 1: "); Serial.println(blk0reg1, HEX);
Serial.print("Block 0, Register 2: "); Serial.println(blk0reg2, HEX);
Serial.print("Block 0, Register 3: "); Serial.println(blk0reg3, HEX);
Serial.print("Block 0, Register 4: "); Serial.println(blk0reg4, HEX);
Serial.print("Block 0, Register 5: "); Serial.println(blk0reg5, HEX);
Serial.print("Block 0, Register 6: "); Serial.println(blk0reg6, HEX);
//Serial.print("Block 0, Register 7: "); Serial.println(blk0reg7, HEX);
}
void loop() {
}
The return for one of the device:
Block 0, Register 0: 0
Block 0, Register 1: F71DD3B8
Block 0, Register 2: 330C6
Block 0, Register 3: A000
Block 0, Register 4: 1236
Block 0, Register 5: 100000
Block 0, Register 6: 4
Whereby the last 4 digits of Block 0, Register 2 (first one or two is the checksum) + Register 1 is the MAC 30C6F71DD3B8. And I also could not read the last Resister 7 for some reason. Also have lost time with
esp_efuse_read_field_blob and could not find a working sample sketch.