zephyr/tests/drivers/adc/adc_accuracy_test
Bartlomiej Buczek dfbcea777a tests: drivers: adc_accuracy: add calibration before sampling
Calibrate adc before taking measurement.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-10-23 17:02:17 +02:00
..
boards tests: drivers: adc_accuracy: parametrize expected accuracy 2024-10-23 17:02:17 +02:00
src tests: drivers: adc_accuracy: add calibration before sampling 2024-10-23 17:02:17 +02:00
CMakeLists.txt
Kconfig
README.txt
prj.conf
testcase.yaml tests: adc_accuracy: add overlay for nrf54l15dk. 2024-10-23 17:02:17 +02:00

README.txt

ADC accuracy test

This test checks that ADC readings match an expected value. It is
done using two approaches:

 - DAC source: a board DAC pin is set to a known value, which is then
 read on an ADC one. If they match, the test passes.

 - Reference voltage: an ADC channel is read and compared to an expected
 value.

For the DAC source, it is expected that DAC and ADC are connected. This
can be indicated for twister runs by setting the fixture "dac_adc_loop".
The test then sets DAC to half its resolution and reads the ADC to see
if they match. Note that DAC and ADC are expected to generate/read
voltage on the same range.

In the reference voltage case, the ADC is expected to be connected to a
known voltage reference, whose value is informed, in millivolts, at
property "reference_mv" from "zephyr,user" node. The test reads the ADC
to see if they match.