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 created an application for testng the sampling of 2 channels on AIN0 and AIN1. The files are attached. I have few doubts.
1. In the adc.h, is #define BUFFER_SIZE 2 right or wrong to sample 2 analog channels ? If in future, 3 chhannels are required, may I set #define BUFFER_SIZE 3.
2. In the main file, I adc instantiated by binding and then, set up channels using err = adc_channel_setup() .. function. Is it proper way ?
3. As, I copied the most coe from sample program, what is meaning of following ?
#if defined (CONFIG_BOARD_BMS_NRF5340_CPUAPP)
NRF_SAADC->TASKS_CALIBRATEOFFSET = 1;
4. I wrote two sample functions, as in adc.c. Is this proper way to add to sequence ? If, wrong any where, may you make changes and attache corrected code file ?
5. I called adc sampling functions in repeatitive timer. Is the result of adc from AIN0 and AIN1 be avaialble at same index or at different indices in p_sample_buffer[].


Gulzar Singh
Hello Gulzar,
I have started looking at your files. Could you please send me the whole project so I can try to reproduce it?
Best Regards,
Kazi Afroza Sultana
Hi, here is the code in attached file.

I mean the project folder which contain build file, configure file, cmakelist text file and source file. like the following screenshot:

Hi, I just need answer of three queries as shown in attached image.