ADC Sampling Time

With the Colibri iMX8X, what’s the best way to change the sampling frequency or sampling time? Can I change it in a terminal for test purposes before committing to a device tree ?

I have a very low source resistance feeding the ADC inputs and the ADC counts registered are low. I can only assume it has something to do with the sampling time especially with a 10K resistor added in series with the ADC inputs (I could be wrong on that).

On another test, I connected a power supply with the current limit set very high to an analog to digital input using the Colibri evaluation board and the AD counts were lower than expected.

The source resistance should be no issue in any of my test completed.

Thanks

Changing ADC sampling rate on the fly currently is not implemented. You can configure it only at Device Tree by changing “assigned-clock-rates” ADC node property. Sampling rate is 3 times lower than clock rate. However driver enables HW averaging with 128 samples. So actual data rate is 128 times slower.
Please check driver source code for more details.

You can try to increase Sample Time Select (STS) to allows higher impedance inputs to be more accurately sampled. Currently It’s hardcoded to 0 at imx8qxp_adc_mode_config() function.