Hello,
status = "okay";
};
compatible = "nordic,nrf-spim";
status = "okay";
sck-pin = <13>;
mosi-pin = <09>;
miso-pin = <40>;
};
Hello,
Hi learner,
In the NCS tutorial you can see how to add a ADC peripheral to your project.
For the .dts you could use "io-channels" as shown here.
Also here is a simple unofficial ADC sample that may be of help.
Hi Martin,
I give up. I tried few flavours of the overlay file and none worked. The project always fail to load.
# Method 1:
&adc {
# compatible = "nordic,nrf-saadc";
compatible = "voltage-divider";
adc5:adc@... {
label = "AIN_5";
}
adc7:adc@... {
label = "AIN_5";
}
n: node {
io-channels = <&adc5 26>, <&adc7 28>;
io-channel-names = "FOIL", "STRAP";
};
};
# Method 2:
adc0: adc@4000E000 {
compatible = "nordic,nrf-saadc";
# compatible = "voltage-divider";
label = "ADC_0";
};
n: node {
io-channels = <&adc0 4>;
io-channel-names = "AIN_0";
};
Kind regards
Mohamed
Hi Martin,
I give up. I tried few flavours of the overlay file and none worked. The project always fail to load.
# Method 1:
&adc {
# compatible = "nordic,nrf-saadc";
compatible = "voltage-divider";
adc5:adc@... {
label = "AIN_5";
}
adc7:adc@... {
label = "AIN_5";
}
n: node {
io-channels = <&adc5 26>, <&adc7 28>;
io-channel-names = "FOIL", "STRAP";
};
};
# Method 2:
adc0: adc@4000E000 {
compatible = "nordic,nrf-saadc";
# compatible = "voltage-divider";
label = "ADC_0";
};
n: node {
io-channels = <&adc0 4>;
io-channel-names = "AIN_0";
};
Kind regards
Mohamed
Hi Mohamed,
I see you are getting support with regards to this in this case: https://devzone.nordicsemi.com/f/nordic-q-a/66702/build-zephyr-elf-versus-build-solution/275634#275634
So lets us keep the discussion there.
That is fine.