Hi.
I'm using nRF Connect SDK 2.6.1.
I'm developing my own board based on nRF52840 SoC. So, I created an overlay file from nRF52840dk device tree. I could configure and implement SHT40, LIS3DH and a hall effect sensor successfully.
Now, I'm trying to configure and implement "AIN2" ADC channel to read the voltage of battery supply.
Before, I would assumed that reading an ADC channel be a very simple work as my previous experiments with other MCUs. But I was unsuccessful after 3 days spending for testing several configurations and available examples. The result of all configurations and tests are same.
Please, help me.
I explain my latest configurations step by step:
1. Configure ADC channel by using Devicetree Visual Editor:
2. Add <#address-cells>
and <#size-cells>
properties to adc:
4. Add below checking:
5. Add below configuration:
7. Build the code successfully:


Why debug shows: <err> adc_nrfx_saadc: Channel 1 not configured !?
I'm using Channel 2!!!