Skip to content

ESP32-S2 ADC2 Issue (IDFGH-3834) #4265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DitroniX opened this issue Aug 17, 2020 · 2 comments
Closed

ESP32-S2 ADC2 Issue (IDFGH-3834) #4265

DitroniX opened this issue Aug 17, 2020 · 2 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@DitroniX
Copy link

Using the Arduino IDE, the ESP32-S2 ADC1 channels (GPIO 1 through 10) work fine and gives back the expected reading.

// Read ADC (30V DC FSV - 0 to 8191 - 13bit)
uint32_t PCB_Voltage;
PCB_Voltage = ((analogRead(9) * 30 ) / 8191);
Serial.println(PCB_Voltage);

However, if I use any ADC2 channels (GPIO 11 through 20) ), I get an error:

// Read ADC (30V DC FSV - 0 to 8191 - 13bit)
uint32_t PCB_Voltage;
PCB_Voltage = ((analogRead(17) * 30 ) / 8191);
Serial.println(PCB_Voltage);

E (4127) ADC: /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/adc_common.c:476 (adc2_get_raw):WIDTH ERR: ESP32S2 support 13 bit width

PS. The below basic code does the same, only on ADC2, so excluding any value manipulation

analogReadResolution(13);
Serial.println(analogRead(17));

Question: Is this a permanent restriction for ADC2, or simply due to beta code?

Original Post: https://www.esp32.com/viewtopic.php?f=19&t=16950&p=63996#p63996

Thanks
Dave

@github-actions github-actions bot changed the title ESP32-S2 ADC2 Issue ESP32-S2 ADC2 Issue (IDFGH-3834) Aug 17, 2020
@me-no-dev me-no-dev transferred this issue from espressif/esp-idf Aug 18, 2020
@stale
Copy link

stale bot commented Oct 17, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Oct 17, 2020
@stale
Copy link

stale bot commented Oct 31, 2020

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

1 participant