From d5792abbcf3cc7d5881884d31e84c6714bf99b32 Mon Sep 17 00:00:00 2001 From: Daniel DeGrasse Date: Fri, 2 Jun 2023 14:52:29 +0000 Subject: [PATCH] tests: drivers: adc: adc_dma: increase sampling interval for MCUX ADC16 Increase hardware sampling interval to 30ms for MCUX ADC16. The ADC callback in the repeated_samplings test takes roughly 27ms to execute, so a sampling frequency of this interval still allows the ADC test to verify the ADC is being sampled at a given interval, while avoiding the pitfalls that result from a kernel timer shorter than the duration the ADC callback takes to run. Fixes #58467 Signed-off-by: Daniel DeGrasse --- tests/drivers/adc/adc_dma/src/test_adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/drivers/adc/adc_dma/src/test_adc.c b/tests/drivers/adc/adc_dma/src/test_adc.c index 22cf30593c20..935f65b83aaf 100644 --- a/tests/drivers/adc/adc_dma/src/test_adc.c +++ b/tests/drivers/adc/adc_dma/src/test_adc.c @@ -23,7 +23,7 @@ #define ADC_ACQUISITION_TIME ADC_ACQ_TIME_DEFAULT #define ADC_1ST_CHANNEL_ID 26 #define COUNTER_NODE_NAME pit0 -#define HW_TRIGGER_INTERVAL (2U) +#define HW_TRIGGER_INTERVAL (30000U) #define SAMPLE_INTERVAL_US HW_TRIGGER_INTERVAL #elif defined(CONFIG_BOARD_FRDM_K82F) @@ -35,7 +35,7 @@ #define ADC_ACQUISITION_TIME ADC_ACQ_TIME_DEFAULT #define ADC_1ST_CHANNEL_ID 26 #define COUNTER_NODE_NAME pit0 -#define HW_TRIGGER_INTERVAL (2U) +#define HW_TRIGGER_INTERVAL (30000U) #define SAMPLE_INTERVAL_US HW_TRIGGER_INTERVAL #elif defined(CONFIG_BOARD_NUCLEO_H743ZI)