docs: Correct ADC default resolution statement for ESP32-S2 #11653
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
This PR corrects the documentation for analogReadResolution by removing an incorrect statement that the ESP32-S3 default ADC resolution is 13 bits.
As confirmed by the function's own documentation in the core header file esp32-hal-adc.h, the default resolution for analogRead is 12 bits (producing a range of 0-4095).
Tests scenarios
Compiled and run on Seeed Studio XIAO ESP32S3 in version v3.3.0. By running the standard AnalogReadSerial example code, confirmed that the default output range is 0-4095, corresponding to 12-bit resolution.
Related links
https://docs.espressif.com/projects/arduino-esp32/en/latest/api/adc.html#analogreadresolution
arduino-esp32/cores/esp32/esp32-hal-adc.h
Lines 49 to 56 in c7520cc
https://github.com/espressif/esp-idf/blob/346870a3044010f2018be0ef3b86ba650251c655/components/soc/esp32s3/include/soc/soc_caps.h#L129-L130