mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_adc_cali_error_after_light_sleep_wake_on_h2_v5.1' into 'release/v5.1'
adc: fix calibration error when waking up from light sleep on H2 and enable test (v5.1) See merge request espressif/esp-idf!27603
This commit is contained in:
commit
8425cada28
@ -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
|
#define ADC2_SLEEP_TEST_CHAN ADC_CHANNEL_0
|
||||||
#endif
|
#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);
|
s_adc_oneshot_with_sleep(ADC_UNIT_1, ADC1_SLEEP_TEST_CHAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (SOC_ADC_PERIPH_NUM >= 2) && !CONFIG_IDF_TARGET_ESP32C3
|
#if (SOC_ADC_PERIPH_NUM >= 2) && !CONFIG_IDF_TARGET_ESP32C3
|
||||||
//ESP32C3 ADC2 oneshot mode is not supported anymore
|
//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);
|
s_adc_oneshot_with_sleep(ADC_UNIT_2, ADC2_SLEEP_TEST_CHAN);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Restore regi2c analog calibration related configuration registers.
|
* 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_PD_WORKAROUND 1
|
||||||
#define REGI2C_ANA_CALI_BYTE_NUM 8
|
#define REGI2C_ANA_CALI_BYTE_NUM 8
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Restore regi2c analog calibration related configuration registers.
|
* 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_PD_WORKAROUND 1
|
||||||
#define REGI2C_ANA_CALI_BYTE_NUM 8
|
#define REGI2C_ANA_CALI_BYTE_NUM 8
|
||||||
|
@ -26,3 +26,10 @@
|
|||||||
#define ANA_CONFIG2_M BIT(18)
|
#define ANA_CONFIG2_M BIT(18)
|
||||||
|
|
||||||
#define ANA_I2C_SAR_FORCE_PU BIT(16)
|
#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
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Restore regi2c analog calibration related configuration registers.
|
* 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_PD_WORKAROUND 1
|
||||||
#define REGI2C_ANA_CALI_BYTE_NUM 8
|
#define REGI2C_ANA_CALI_BYTE_NUM 8
|
||||||
|
@ -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
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Restore regi2c analog calibration related configuration registers.
|
* 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_PD_WORKAROUND 1
|
||||||
#define REGI2C_ANA_CALI_BYTE_NUM 8
|
#define REGI2C_ANA_CALI_BYTE_NUM 8
|
||||||
|
Loading…
Reference in New Issue
Block a user