ADC calibration clarification
Posted: Tue Mar 17, 2020 3:05 pm
I want to make sure my understanding of the ADC calibration documentation from the link below is correct.
https://docs.espressif.com/projects/esp ... s/adc.html
I can confirm that the eFuse Vref has been programmed into the chip I'm working with. Looking at the function 'esp_adc_cal_characterize', it takes a DEFAULT_VREF. Can I assume that esp_adc_cal_characterize will ignore DEFAULT_VREF passed in and use eFuse Vref whenever available during the characterization?
https://docs.espressif.com/projects/esp ... s/adc.html
I can confirm that the eFuse Vref has been programmed into the chip I'm working with. Looking at the function 'esp_adc_cal_characterize', it takes a DEFAULT_VREF. Can I assume that esp_adc_cal_characterize will ignore DEFAULT_VREF passed in and use eFuse Vref whenever available during the characterization?
Code: Select all
//Characterize ADC at particular atten
esp_adc_cal_characteristics_t *adc_chars = calloc(1, sizeof(esp_adc_cal_characteristics_t));
esp_adc_cal_value_t val_type = esp_adc_cal_characterize(unit, atten, ADC_WIDTH_BIT_12, DEFAULT_VREF, adc_chars);
//Check type of calibration value used to characterize ADC
if (val_type == ESP_ADC_CAL_VAL_EFUSE_VREF) {
printf("eFuse Vref");
} else if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP) {
printf("Two Point");
} else {
printf("Default");
}