ESP32 SoCs: Offset of 80mV when raw values gotten from adc_read() are passed throug adc_raw_to_millivolts() #86207
Labels
area: ADC
Analog-to-Digital Converter (ADC)
bug
The issue is a bug, or the PR is fixing a bug
platform: ESP32
Espressif ESP32
priority: high
High impact/importance bug
Describe the bug
Offset of arroud 80mV is observed when raw values gotten from adc_read() are passed through adc_raw_to_millivolts()
What target platform are you using?
This behavior was observed in 3 boards with ESP32 SoCs:
esp32_devkitc_wrover
esp32s3_devkitc
esp32c3_devkitm
What have you tried to diagnose or workaround this issue?
I have applied voltage signals generated with a signal generator, measured the voltage at the analog input and compared with the value reported by running the sample
zephyr/samples/drivers/adc_dt
. Aparently the value returned by adc_read() is already the voltage applyed to the analog input in mV.Is this a regression? If yes, have you been able to "git bisect" it to a
specific commit?
Apparently it is a regression. Using "git bisect" I verified the bug was introduced in the commit f195b35 that whose the commit message is:
Before this commit, the values shown by the sample code are coherent with the voltage present at the analog input.
To Reproduce
Expected behavior
It was expect to read values near to the voltage present at the analog input been shown by the sample code
Impact
Incorrect reading from adc_read() and consequently from adc_raw_to_millivolts()
Logs and console output
board: esp32s3_devkitc
gain: 1/4
voltage applied: 992mV
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: