Merge branch 'bugfix/fix_adc_cali_error_after_light_sleep_wake_on_h2_v5.2' into 'release/v5.2'

adc: fix calibration error when waking up from light sleep on H2 and enable test (v5.2)

See merge request espressif/esp-idf!27602
This commit is contained in:
morris 2023-12-07 14:29:55 +08:00
commit 61bd19b446
6 changed files with 14 additions and 7 deletions

View File

@ -286,14 +286,14 @@ static void s_adc_oneshot_with_sleep(adc_unit_t unit_id, adc_channel_t channel)
#define ADC2_SLEEP_TEST_CHAN ADC_CHANNEL_0
#endif
TEST_CASE("test ADC1 Single Read with Light Sleep", "[adc][manul][ignore]")
TEST_CASE("test ADC1 Single Read with Light Sleep", "[adc]")
{
s_adc_oneshot_with_sleep(ADC_UNIT_1, ADC1_SLEEP_TEST_CHAN);
}
#if (SOC_ADC_PERIPH_NUM >= 2) && !CONFIG_IDF_TARGET_ESP32C3
//ESP32C3 ADC2 oneshot mode is not supported anymore
TEST_CASE("test ADC2 Single Read with Light Sleep", "[adc][manul][ignore]")
TEST_CASE("test ADC2 Single Read with Light Sleep", "[adc]")
{
s_adc_oneshot_with_sleep(ADC_UNIT_2, ADC2_SLEEP_TEST_CHAN);
}

View File

@ -30,7 +30,7 @@
/**
* Restore regi2c analog calibration related configuration registers.
* This is a workaround, and is fixed on later chips
* This is a workaround for calibration error when waking up from light sleep
*/
#define REGI2C_ANA_CALI_PD_WORKAROUND 1
#define REGI2C_ANA_CALI_BYTE_NUM 8

View File

@ -28,7 +28,7 @@
/**
* Restore regi2c analog calibration related configuration registers.
* This is a workaround, and is fixed on later chips
* This is a workaround for calibration error when waking up from light sleep
*/
#define REGI2C_ANA_CALI_PD_WORKAROUND 1
#define REGI2C_ANA_CALI_BYTE_NUM 8

View File

@ -26,3 +26,10 @@
#define ANA_CONFIG2_M BIT(18)
#define ANA_I2C_SAR_FORCE_PU BIT(16)
/**
* Restore regi2c analog calibration related configuration registers.
* This is a workaround for calibration error when waking up from light sleep
*/
#define REGI2C_ANA_CALI_PD_WORKAROUND 1
#define REGI2C_ANA_CALI_BYTE_NUM 8

View File

@ -24,7 +24,7 @@
/**
* Restore regi2c analog calibration related configuration registers.
* This is a workaround, and is fixed on later chips
* This is a workaround for calibration error when waking up from light sleep
*/
#define REGI2C_ANA_CALI_PD_WORKAROUND 1
#define REGI2C_ANA_CALI_BYTE_NUM 8

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -27,7 +27,7 @@
/**
* Restore regi2c analog calibration related configuration registers.
* This is a workaround, and is fixed on later chips
* This is a workaround for calibration error when waking up from light sleep
*/
#define REGI2C_ANA_CALI_PD_WORKAROUND 1
#define REGI2C_ANA_CALI_BYTE_NUM 8