Skip to content

Commit

Permalink
tests: drivers: adc: adc_dma: increase sampling interval for MCUX ADC16
Browse files Browse the repository at this point in the history
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 zephyrproject-rtos#58467

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
  • Loading branch information
danieldegrasse authored and nashif committed Jun 2, 2023
1 parent 4375962 commit d5792ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/drivers/adc/adc_dma/src/test_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit d5792ab

Please sign in to comment.