Nordic
Configure an ADC channel and produce stable, plausible samples from an analog input.
Applies when
Use when bringing up analog sensors, battery/voltage measurements, potentiometers, or other ADC-based inputs in a Nordic project.
Show pattern details
Hide pattern details
Intent
Inspect the target and project configuration, select an available analog input, acquire a configurable sequence of ADC samples, and report raw values plus converted voltage when the platform configuration supports a trustworthy conversion.
Expectation
Samples are acquired without driver errors, remain stable for a steady input, and change in the expected direction when the input voltage is deliberately changed.
Success criteria
The requested number of samples is collected without ADC/driver errors. A steady input produces reasonably stable readings, and a deliberate input change produces a clear corresponding change in the sampled value.
How it is verified
Capture a sequence of timestamped samples with the input held steady, then deliberately change the input when practical and confirm a corresponding change. Compare against an independently measured or known voltage when available, but do not fail a raw-code test solely because a calibrated voltage is unavailable.