From b139bae5028ac2be25cd91943f62c7546b307ea1 Mon Sep 17 00:00:00 2001 From: Wulu Date: Sun, 27 Jul 2025 19:50:20 +0800 Subject: [PATCH 1/3] docs: Remove incorrect statement on ESP32-S3 default resolution --- docs/en/api/adc.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/en/api/adc.rst b/docs/en/api/adc.rst index 434384f8d9b..9c16db54ec1 100644 --- a/docs/en/api/adc.rst +++ b/docs/en/api/adc.rst @@ -52,8 +52,7 @@ This function will return analog value in millivolts (calibrated). analogReadResolution ^^^^^^^^^^^^^^^^^^^^ -This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4095) -for all chips except ESP32-S3 where default is 13 bits (range from 0 to 8191). +This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4095). When different resolution is set, the values read will be shifted to match the given resolution. Range is 1 - 16 .The default value will be used, if this function is not used. From 6cc7a63cd021e6cd457d086dc1efb6b550554c65 Mon Sep 17 00:00:00 2001 From: Wulu Date: Mon, 28 Jul 2025 22:43:55 +0800 Subject: [PATCH 2/3] docs: Change ADC default resolution exception to ESP32-S2 --- docs/en/api/adc.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/en/api/adc.rst b/docs/en/api/adc.rst index 9c16db54ec1..416a8afd803 100644 --- a/docs/en/api/adc.rst +++ b/docs/en/api/adc.rst @@ -52,7 +52,8 @@ This function will return analog value in millivolts (calibrated). analogReadResolution ^^^^^^^^^^^^^^^^^^^^ -This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4095). +This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4095) +for all chips except ESP32-S2 where default is 13 bits (range from 0 to 8191). When different resolution is set, the values read will be shifted to match the given resolution. Range is 1 - 16 .The default value will be used, if this function is not used. From b9c0f689ae3bdb7e40cc34b69ae2a8681a060af5 Mon Sep 17 00:00:00 2001 From: wulu Date: Wed, 30 Jul 2025 22:36:29 +0800 Subject: [PATCH 3/3] docs: Specify ADC resolution errata for ESP32-S2 v0.0 --- docs/en/api/adc.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/en/api/adc.rst b/docs/en/api/adc.rst index 416a8afd803..f2245cc1e5d 100644 --- a/docs/en/api/adc.rst +++ b/docs/en/api/adc.rst @@ -52,10 +52,12 @@ This function will return analog value in millivolts (calibrated). analogReadResolution ^^^^^^^^^^^^^^^^^^^^ -This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4095) -for all chips except ESP32-S2 where default is 13 bits (range from 0 to 8191). +This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4095) for all chips. When different resolution is set, the values read will be shifted to match the given resolution. +.. note:: + For **ESP32-S2 chip revision v0.0**, the default ADC resolution is 13 bits (0-8191) due to the `ADC-112 errata `_. This is fixed in later revisions (v1.0+), which use the standard 12-bit resolution. + Range is 1 - 16 .The default value will be used, if this function is not used. .. note:: For the ESP32, the resolution is between 9 to12 and it will change the ADC hardware resolution. Else value will be shifted.