From 0e6c8aef1910761c32e9508b87a8bdd365f7e031 Mon Sep 17 00:00:00 2001 From: Armando Date: Mon, 25 Jul 2022 10:40:52 +0800 Subject: [PATCH] esp_adc: increase adc continuous iram test time overhead a bit Prior to this commit, overhead is 0us on esp32s2, s3, c3, c2. However when the conv_done event happens, software takes some time to do necessary operations. --- .../driver/test_apps/legacy_adc_driver/main/test_app_main.c | 2 +- components/esp_adc/test_apps/adc/main/test_adc_driver_iram.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/driver/test_apps/legacy_adc_driver/main/test_app_main.c b/components/driver/test_apps/legacy_adc_driver/main/test_app_main.c index 027d2b69c0..69a22c523f 100644 --- a/components/driver/test_apps/legacy_adc_driver/main/test_app_main.c +++ b/components/driver/test_apps/legacy_adc_driver/main/test_app_main.c @@ -8,7 +8,7 @@ #include "unity_test_runner.h" #include "esp_heap_caps.h" -#define TEST_MEMORY_LEAK_THRESHOLD (-300) +#define TEST_MEMORY_LEAK_THRESHOLD (-400) static size_t before_free_8bit; static size_t before_free_32bit; diff --git a/components/esp_adc/test_apps/adc/main/test_adc_driver_iram.c b/components/esp_adc/test_apps/adc/main/test_adc_driver_iram.c index dd493aec08..bfdf8822bf 100644 --- a/components/esp_adc/test_apps/adc/main/test_adc_driver_iram.c +++ b/components/esp_adc/test_apps/adc/main/test_adc_driver_iram.c @@ -219,7 +219,7 @@ TEST_CASE("ADC continuous work with ISR and Flash", "[adc_oneshot]") //This may need to be bigger, when the sampling freq is low uint32_t overhead_us = 150; #else - uint32_t overhead_us = 0; + uint32_t overhead_us = 50; #endif uint32_t wait_time_us = (1000 * 1000 / ADC_TEST_FREQ_HZ * ADC_TEST_PKG_SIZE / SOC_ADC_DIGI_RESULT_BYTES) + overhead_us; printf("period is %d us\n", wait_time_us);