ADC calibration clarification

tichindeal
Posts: 3
Joined: Mon Mar 09, 2020 2:09 am

ADC calibration clarification

Postby tichindeal » 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?

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");
    }

Who is online

Users browsing this forum: axellin, Google [Bot] and 77 guests