mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(adc): restore cali registers after light sleep wake up on H2 and enable test
This commit is contained in:
parent
11097a4fc2
commit
4f81883ccf
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user