Skip to content

adc oneshot read fail #9010

Closed
Closed
@josef2600

Description

@josef2600

Board

ESP32 DEV

Device Description

nothing is attached. only put 100nf caps on ADC pins.

Hardware Configuration

analog pins, gpio 32-33-34-35

Version

latest master (checkout manually)

IDE Name

arduino

Operating System

win 10

Flash frequency

80 mhz

PSRAM enabled

no

Upload speed

921600

Description

since in board version 3.0 you have removed any checking attach pins or custom settings, i only have this in setup:

  analogReadResolution(12); //12 for all chips except ESP32S3 where default is 13 bits (range from 0 to 8192)
  analogSetAttenuation(ADC_11db); //for C3 => ADC_11db: 2770 mv - ADC_6db: 1509 mv - ADC_2_5db: 1083 mv - ADC_0db: 800 mv

i have created a task that only reads multi analog pins:

        my_static_readadc_cX += analogReadMilliVolts(32);
        my_static_readadc_cX += analogReadMilliVolts(33);
        my_static_readadc_cX += analogReadMilliVolts(34);
        my_static_readadc_cX += analogReadMilliVolts(35);

but i always get these warnings:

E (38271) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 37257][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (39327) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 38312][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (40381) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 39366][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (42487) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 41472][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (43541) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 42526][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (44592) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 43577][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (45646) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 44631][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!


in version 2.0.14 this code works just fine, but in version 3 it gets me these warnings and reads bad values. the real value is 0, but when i get these, the reading values become 250 or 300 or like that instead of 0. there are zero volt on them.
i am using debug (info).
what is going on? why did you change everything so poorly?

Sketch

----

Debug Message

E (38271) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 37257][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (39327) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 38312][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (40381) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 39366][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (42487) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 41472][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (43541) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 42526][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (44592) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 43577][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!
E (45646) adc_oneshot: adc_oneshot_get_calibrated_result(250): adc oneshot read fail
[ 44631][E][esp32-hal-adc.c:333] __analogReadMilliVolts(): adc_oneshot_get_calibrated_result failed!

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions