I need twoADC channels. I tried to configure using :
CONFIG_ADC= y in prj file,
&adc{
#io-channel-cells = < 0x2 >;
}; in overlay file .. the compile error appears as shown in atteched iamge.
Gulzar Singh

I need twoADC channels. I tried to configure using :
CONFIG_ADC= y in prj file,
&adc{
#io-channel-cells = < 0x2 >;
}; in overlay file .. the compile error appears as shown in atteched iamge.
Gulzar Singh

Hi, I tested the program in the attached file. AN0 and AN1 channels configured to sample two anlaog Inputs. The AN0 channel is sampled very well and the ADC result is avaialbale at index 0 of the buffer. The result of AN1 should be available at index 1 of buffer, but remains zero. Please, have a look at the code. If, you test it with any variable voltage at AN0 and AN1, will be better to verify.

Hello Gulzar,
Sorry for the late reply; I was in sick leave.
How does your overlay file look like?
/ {
zephyr,user {
/* adjust channel number according to pinmux in board.dts */
io-channels = <&adc 0>, <&adc 1>;
};
};
Hello Gulzar,
Sorry for the late reply; I was in sick leave.
How does your overlay file look like?
/ {
zephyr,user {
/* adjust channel number according to pinmux in board.dts */
io-channels = <&adc 0>, <&adc 1>;
};
};