ADC configuration for nRF5340DK SDK Connect SES

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

Parents
  • 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.

Reply
  • 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.

Children
Related