Hi there,
I use the ADC in my firmware, which works well, but I also want to use it from the shell.
I enabled the CONFIG_ADC_SHELL Kconfig option, which made the "adc" command available in the shell, but I get the following error:
$ adc adc@40007000 read 0 E: Channel 0 not configured
The relevant devicetree nodes:
&adc {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1_6";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,input-positive = <NRF_SAADC_AIN2>; // TS_ADC
zephyr,resolution = <12>;
};
channel@1 {
reg = <1>;
zephyr,gain = "ADC_GAIN_1_4";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,input-positive = <NRF_SAADC_AIN3>; // VBAT_ADC
zephyr,resolution = <12>;
};
};
Thanks in advance!
- Laci