<?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>Not able to read ADC on nrf5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67419/not-able-to-read-adc-on-nrf5340</link><description>Hello, 
 I have been trying to get the ADC working but for some reason, the adc_read function throws an error of invalid argument ( -EINVAL (-22) ). The adc_channel_setup function returns 0. 
 I&amp;#39;m using SDK v1.3.0 and given below is my code and config</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Apr 2021 07:13:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67419/not-able-to-read-adc-on-nrf5340" /><item><title>RE: Not able to read ADC on nrf5340</title><link>https://devzone.nordicsemi.com/thread/304183?ContentTypeID=1</link><pubDate>Mon, 12 Apr 2021 07:13:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5408975-a10c-4e6d-83be-050de247f215</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;I updated my original post with a ncs v1.5.0 friendly modified sample.&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: Not able to read ADC on nrf5340</title><link>https://devzone.nordicsemi.com/thread/304111?ContentTypeID=1</link><pubDate>Sat, 10 Apr 2021 00:29:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9901b371-3b16-404f-90dd-aa3fcbe2f7bf</guid><dc:creator>Natael</dc:creator><description>&lt;p&gt;Yeah i did that bit it doesnt work.&lt;/p&gt;
&lt;p&gt;Did It work for you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to read ADC on nrf5340</title><link>https://devzone.nordicsemi.com/thread/303884?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 01:06:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:090a2263-c05e-490b-8c0a-883ee8500d62</guid><dc:creator>sethu</dc:creator><description>&lt;p&gt;Hey, try this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;adc_dev = device_get_binding(&amp;quot;ADC_0&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to read ADC on nrf5340</title><link>https://devzone.nordicsemi.com/thread/303609?ContentTypeID=1</link><pubDate>Wed, 07 Apr 2021 21:17:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3571e827-b592-4212-b54c-4855e0efd90c</guid><dc:creator>Natael</dc:creator><description>&lt;p&gt;I tried it with the nRF5340 and it doest works. Fails at&amp;nbsp;device_get_binding.&lt;/p&gt;
&lt;p&gt;What could i do? :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to read ADC on nrf5340</title><link>https://devzone.nordicsemi.com/thread/276168?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2020 11:56:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6098ad10-fdd0-4ffa-a1ff-92da8778cd09</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;Here&amp;#39;s a sample that should run on all nRF5-devices in ncs v1.3.0, with the proper overlay file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5684.adc_5F00_sample.zip"&gt;devzone.nordicsemi.com/.../5684.adc_5F00_sample.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The above only has overlay for the nrf5340pdk_nrf5340_cpuapp board.&lt;/p&gt;
&lt;p&gt;Could you try this and see if it works?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;*edit* updated to ncs v1.5.0, with float print support:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/adc_5F00_sample_5F00_ncs_5F00_v1.5.0.zip"&gt;devzone.nordicsemi.com/.../adc_5F00_sample_5F00_ncs_5F00_v1.5.0.zip&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></channel></rss>