fix(adc): workaround to fix adc continuous get less results on c3

This commit is contained in:
gaoxu
2024-01-23 18:47:19 +08:00
committed by Gao Xu
parent f68c131e56
commit 2eccde88f3
5 changed files with 43 additions and 8 deletions

View File

@@ -419,6 +419,11 @@ esp_err_t adc_continuous_stop(adc_continuous_handle_t handle)
//stop ADC
adc_hal_digi_stop(&handle->hal);
#if ADC_LL_WORKAROUND_CLEAR_EOF_COUNTER
periph_module_reset(PERIPH_SARADC_MODULE);
adc_hal_digi_clr_eof();
#endif
adc_hal_digi_deinit(&handle->hal);
if (handle->use_adc2) {

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -264,10 +264,8 @@ TEST_CASE("ADC continuous flush internal pool", "[adc_continuous][mannual][ignor
TEST_ESP_OK(adc_continuous_deinit(handle));
}
#if !CONFIG_IDF_TARGET_ESP32C3 //TODO: DIG-270
#define ADC_RESTART_TEST_SIZE 4096
#define ADC_READ_TEST_COUNT 10
#define ADC_READ_TEST_COUNT 100
TEST_CASE("ADC continuous test after restarting", "[adc_continuous]")
{
@@ -313,7 +311,6 @@ TEST_CASE("ADC continuous test after restarting", "[adc_continuous]")
TEST_ESP_OK(adc_continuous_deinit(handle));
free(result);
}
#endif //!CONFIG_IDF_TARGET_ESP32C3
#if SOC_ADC_DIG_IIR_FILTER_SUPPORTED
TEST_CASE("ADC filter exhausted allocation", "[adc_continuous]")