<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ADC Config Invalid Value nRF Connect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91092/adc-config-invalid-value-nrf-connect</link><description>Hello, I am using the nRF connect SDK and am currently running into some issues with using the on board ADC. My issue relates to the adc_channel_setup function which returns an error 22 (Invalid Argument). Despite this I can&amp;#39;t find the source of this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Aug 2022 07:20:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91092/adc-config-invalid-value-nrf-connect" /><item><title>RE: ADC Config Invalid Value nRF Connect</title><link>https://devzone.nordicsemi.com/thread/382379?ContentTypeID=1</link><pubDate>Fri, 19 Aug 2022 07:20:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35af9fc9-cd83-4b7a-adde-335ddc8ec8e6</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You&amp;#39;re ending up in the default switch case here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/adc/adc_nrfx_saadc.c#L123-L126"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/adc/adc_nrfx_saadc.c#L123-L126&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is because 30 is not a valid acquisition time. You should choose one of the defined ones in the TACQ field:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52810/saadc.html?cp=4_5_0_5_16_10_19#register.CH-0-7.CONFIG"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52810/saadc.html?cp=4_5_0_5_16_10_19#register.CH-0-7.CONFIG&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC Config Invalid Value nRF Connect</title><link>https://devzone.nordicsemi.com/thread/382330?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 17:33:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be8e43f4-6bac-4f7d-bb2a-614687e19f16</guid><dc:creator>EthanDP</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is enabled by default with the nRF52810 DK but I added that to my config as well and the issue still persists&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC Config Invalid Value nRF Connect</title><link>https://devzone.nordicsemi.com/thread/382233?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 11:08:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f409588c-e23b-4afe-9f17-c2c285bfefc2</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have &amp;quot;CONFIG_ADC_CONFIGURABLE_INPUTS&amp;quot; Y-selected at your end?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ADC Config Invalid Value nRF Connect</title><link>https://devzone.nordicsemi.com/thread/382114?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2022 23:26:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e73c88f-5a6c-4df6-b4f3-fb7ee9c51d33</guid><dc:creator>EthanDP</dc:creator><description>&lt;p&gt;I also forgot to include my device tree:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
    aliases {
    	led0 = &amp;amp;led0;
    	bus-int = &amp;amp;bus_int;
    	i2c0 = &amp;amp;i2c0;
    	bootloader-led0 = &amp;amp;led0;
    	adcctrl = &amp;amp;adc;
    };
}

&amp;amp;adc {
	status = &amp;quot;okay&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>