mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
fix(adc): workaround to fix adc continuous get less results on c3
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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]")
|
||||
|
Reference in New Issue
Block a user