Hi,dears,
I had the same problem as this little friend:
My soc is iMx6uLL,but I tested at EVK board. EVK had this problem. So I think it has nothing to do with PCB.
Listed my config:
dts:
&adc1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_adc1>;
vref-supply = <®_vref_3v3>;
num-channels = <2>;
status = "okay";
};
pinctrl_adc1: adc1grp {
fsl,pins = <
MX6UL_PAD_GPIO1_IO08__GPIO1_IO08 0xb0
MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0xb0
>;
};
vf610_adc.c :
static const struct iio_chan_spec vf610_adc_iio_channels[] = {
VF610_ADC_CHAN(9, IIO_VOLTAGE),
VF610_ADC_CHAN(8, IIO_VOLTAGE),
};
#cat /sys/bus/iio/devices/iio\:device0/in_voltage8_raw
3976
In my PCBA board ,ADC_VREFH is OK,3.3V, but why cat out is 3976?
When I connected 1.8V, cat out value is 2233.
It's strange.
Hi cheng
adc is not used in linux as it is used in sdk, so one can test it in sdk:
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------