ReWrite BLK3 ADC TP calibration values esp32 eFuse?
Posted: Fri Apr 23, 2021 9:33 am
Hello,
I've been playing for sometime with the esp32 ADC calibration found a nice quick sketch that assist with that:
https://github.com/tommag/ESP32_ADC_Calibration_tool
and burned the Fuse according to the values the sketch game me:
With the file the command
I've just had to remove the "-n -e" and "x16\\x56" in the "efuse_blk3.bin" File to work correctly
now trying to burn it again it says the following
Also how does the command works? how does it read the values from the bin file and punts them in the right space? how does it distinguish between hex values decimal and binary ones?
less related but still might be relevant:
After flash the TP calibration ADC eFuse registers, Do you just call esp_adc_cal_raw_to_voltage(); to get the correct values or do I have to read the TP calibration values and re use them everytime the sketch inits?
I've been playing for sometime with the esp32 ADC calibration found a nice quick sketch that assist with that:
https://github.com/tommag/ESP32_ADC_Calibration_tool
and burned the Fuse according to the values the sketch game me:
Code: Select all
Final ADC readings after 4096 samples: 308
Now, apply 850mV to GPIO 25 and GPIO34. Press Enter when ready.
Final ADC readings after 4096 samples: 3181
Scaled and shifted calibration values: A1 = 7, B1 = -21, A2 = 918, B2 = 172
EFUSE_BLK3_RDATA3 value: 0x5616F587
------------------------------
To burn these calibration values permanently use the following commands:
echo -n -e \\x87\\xf5\\x16\\x56 > efuse_blk3.bin
espefuse.py burn_block_data --offset 12 BLK3 efuse_blk3.bin
espefuse.py burn_efuse BLK3_PART_RESERVE 1
Code: Select all
echo -n -e \\x87\\xf5\\x16\\x56 > efuse_blk3.bin
now trying to burn it again it says the following
Is there a not too painful way to re write this fuse block?A fatal error occurred: Efuse block already has values written.
Also how does the
Code: Select all
espefuse.py burn_block_data --offset 12 BLK3 efuse_blk3.bin
less related but still might be relevant:
After flash the TP calibration ADC eFuse registers, Do you just call esp_adc_cal_raw_to_voltage(); to get the correct values or do I have to read the TP calibration values and re use them everytime the sketch inits?