Skip to content

Commit 0c9e2c0

Browse files
committed
esp_adc_cal/Remove lookup table
This commit removes the lookup table mode due to inferior performance when compared to linear mode under attenuation 0, 1 and 2. However small portions of the lookup table are kept for the higher voltages of atten 3 (above ADC reading 2880). That voltage range in atten 3 has non linear characteristics making the LUT performan better than linear mode.
1 parent 73cdfbf commit 0c9e2c0

File tree

9 files changed

+370
-636
lines changed

9 files changed

+370
-636
lines changed

components/esp_adc_cal/Kconfig

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,27 @@
11
menu "ADC-Calibration"
22

3-
config ADC_CAL_EFUSE_TP_DISABLE
4-
bool "Disable Two Point values"
5-
default "n"
3+
config ADC_CAL_EFUSE_TP_ENABLE
4+
bool "Use Two Point Values"
5+
default "y"
66
help
7-
Some ESP32s have Two Point calibration values burned into eFuse. Enabling
8-
this option will prevent the ADC calibration component from using Two Point
9-
values if they are available.
7+
Some ESP32s have Two Point calibration values burned into eFuse BLOCK3.
8+
This option will allow the ADC calibration component to characterize the
9+
ADC-Voltage curve using Two Point values if they are available.
1010

11-
config ADC_CAL_EFUSE_VREF_DISABLE
12-
bool "Disable eFuse Vref"
13-
default "n"
11+
config ADC_CAL_EFUSE_VREF_ENABLE
12+
bool "Use eFuse Vref"
13+
default "y"
1414
help
15-
Some ESP32s have ADC Vref burned into eFuse. Enabling this option will
16-
prevent the ADC calibration component from using eFuse Vref if they are
17-
available.
15+
Some ESP32s have Vref burned into eFuse BLOCK0. This option will allow
16+
the ADC calibration component to characterize the ADC-Voltage curve using
17+
eFuse Vref if it is available.
1818

19-
config ADC_CAL_DEFAULT_VREF_DISABLE
20-
bool "Disable Default Vref"
21-
default "n"
19+
config ADC_CAL_LUT_ENABLE
20+
bool "Use Lookup Tables"
21+
default "y"
2222
help
23-
The esp_adc_cal_characterize() function requires the user to provide a
24-
vref_default argument to be used if eFuse values are unavailable. Enabling
25-
this option will prevent the ADC calibration component from using the
26-
vref_default argument. Note that if eFuse values are also unavailabe,
27-
the esp_adc_cal_characterize will trigger an abort.
28-
29-
config ADC_CAL_NO_BLK3_RESERVE_FLAG
30-
bool "EFUSE_BLK3_PART_RESERVE not set"
31-
default "n"
32-
help
33-
By default, ESP32s will have the EFUSE_BLK3_PART_RESERVE flag set if it
34-
uses BLK3 of eFuse to store Two Point values. Some ESP32s do not set this
35-
flag. Enable this option if that is the case
23+
This option will allow the ADC calibration component to use Lookup Tables
24+
to correct for non-linear behavior in 11db attenuation. Other attenuations
25+
do not exhibit non-linear behavior hence will not be affected by this option.
3626

3727
endmenu # ADC-Calibration

0 commit comments

Comments
 (0)