Dear All,
I have an imx6ulevk and I am trying to configure ADC1 for GPIO1_IO01__GPIO1_IO01 - GPIO1_IO03__GPIO1_IO03. I am testing by connecting two potentiometers to GPIO_1 and GPIO_3 of header J1706 out of the Arduino headers. I have changed the imx6ul-14x14-evk.dts to configure ADC1. I enabled ADC1 then set the pin control and regulator. I then disabled tsc and its pin control that was using GPIO_1 and GPIO_3. I see /sys/bus/iio/devices/iio:device0/in_voltage1_raw and in_voltage3_raw, but their values do not change with the changing voltage. The values seem to stay around 3100. I have checked the voltage values with a multimeter to make sure things are connected correctly and they are. I didn't see any place in u-boot where these pads have already been configured. Do you know what I may be missing?
reg_adc_vref_3v3: regulator@2 {
compatible = "regulator-fixed";
regulator-name = "vref-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
&adc1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_adc>;
vref-supply = <®_adc_vref_3v3>;
num-channels = <4>;
status = "okay";
};
pinctrl_adc: adcgrp {
fsl,pins = <
MX6UL_PAD_GPIO1_IO01__GPIO1_IO01 0xb0
MX6UL_PAD_GPIO1_IO03__GPIO1_IO03 0xb0
>;
};
&tsc {
status = "disabled";
};
/*pinctrl_tsc: tscgrp {
fsl,pins = <
MX6UL_PAD_GPIO1_IO01__GPIO1_IO01 0xb0
MX6UL_PAD_GPIO1_IO02__GPIO1_IO02 0xb0
MX6UL_PAD_GPIO1_IO03__GPIO1_IO03 0xb0
MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0xb0
>;
};*/
解決済! 解決策の投稿を見る。
The issue was J1706 of the Arduino headers is disconnected from GPIO_0-4 signals by resistors that were DNP. After adding 0 Ohm resistors to R1718 and R1720 I was able to read voltage with ADC1 on adc input 1 and 3.
The issue was J1706 of the Arduino headers is disconnected from GPIO_0-4 signals by resistors that were DNP. After adding 0 Ohm resistors to R1718 and R1720 I was able to read voltage with ADC1 on adc input 1 and 3.
Cody, would you mind posting an example of reading the ADC1/3 channel here?
I found the issue.