<?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>Runtime error in nrf9160dk ADC program &amp;quot;device_get_binding ADC_0 failed&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79064/runtime-error-in-nrf9160dk-adc-program-device_get_binding-adc_0-failed</link><description>While debugging this code https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/adc/src/main.c using nrf9160dk getting error &amp;quot;device_get_binding ADC_0 failed&amp;quot; 
 Compiling successfully. 
 Can anyone please suggest a solution</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Sep 2021 04:35:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79064/runtime-error-in-nrf9160dk-adc-program-device_get_binding-adc_0-failed" /><item><title>RE: Runtime error in nrf9160dk ADC program "device_get_binding ADC_0 failed"</title><link>https://devzone.nordicsemi.com/thread/329298?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 04:35:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e109bfe9-4d03-4e82-9659-c769fb62a2c4</guid><dc:creator>Shahajas.</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;The issue is solved by selecting ADC driver from the below location&lt;/p&gt;
&lt;p&gt;Project &amp;gt; config nRF SDK project &amp;gt; menuconfig - then search ADC then check &amp;quot;ADC driver&amp;quot; checkbox&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Runtime error in nrf9160dk ADC program "device_get_binding ADC_0 failed"</title><link>https://devzone.nordicsemi.com/thread/328196?ContentTypeID=1</link><pubDate>Mon, 06 Sep 2021 12:26:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:762a1b01-2d1c-4e57-a2f2-3d06c39a641c</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;I see you&amp;#39;re using the macro&amp;nbsp;GPIO_INT_ACTIVE_LOW in the overlay file, which is deprecated and should give you an error while building so I suspect the overlay file isn&amp;#39;t being included in the build for some reason.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you checked that the ADC node is enabled in the resulting DeviceTree? You can see this in the file build/zephyr/zephyr.dts.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Runtime error in nrf9160dk ADC program "device_get_binding ADC_0 failed"</title><link>https://devzone.nordicsemi.com/thread/328056?ContentTypeID=1</link><pubDate>Sat, 04 Sep 2021 12:35:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3420d23d-8720-42b4-9330-5ba862dd5b3a</guid><dc:creator>Shahajas.</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; overlay file

&amp;amp;led0 {
    gpios = &amp;lt;&amp;amp;gpio0 12 GPIO_INT_ACTIVE_LOW&amp;gt;;
    status = &amp;quot;enabled&amp;quot;;
};

&amp;amp;adc {
	status = &amp;quot;ok&amp;quot;;
};

********************************************************
conf file

CONFIG_BSD_LIBRARY=y
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NETWORKING=y
CONFIG_NET_BUF_USER_DATA_SIZE=1
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_RAW_MODE=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
CONFIG_LOG=n
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_HEAP_MEM_POOL_SIZE=1024
# LTE link control
CONFIG_LTE_LINK_CONTROL=n
CONFIG_ADC=y
CONFIG_ADC_0=y
CONFIG_ADC_NRFX_SAADC=y
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_COMPILER_OPT=&amp;quot;-DNRFX_SAADC_ENABLED=1&amp;quot;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Runtime error in nrf9160dk ADC program "device_get_binding ADC_0 failed"</title><link>https://devzone.nordicsemi.com/thread/327477?ContentTypeID=1</link><pubDate>Tue, 31 Aug 2021 16:10:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00f0421d-ee8c-482b-a262-102e9f0b05d1</guid><dc:creator>Shahajas.</dc:creator><description>&lt;p&gt;NCS version v1.5.1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Runtime error in nrf9160dk ADC program "device_get_binding ADC_0 failed"</title><link>https://devzone.nordicsemi.com/thread/327384?ContentTypeID=1</link><pubDate>Tue, 31 Aug 2021 10:49:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f9cc436-ab50-4b90-b560-f1aa473bb67d</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Which NCS tag are you building this on? When getting it to run on master, I had to modify quite a bit more than what you describe.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Runtime error in nrf9160dk ADC program "device_get_binding ADC_0 failed"</title><link>https://devzone.nordicsemi.com/thread/327283?ContentTypeID=1</link><pubDate>Mon, 30 Aug 2021 16:47:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c9b2161-3893-44c6-bdb5-340b28ceb0cc</guid><dc:creator>Shahajas.</dc:creator><description>&lt;p&gt;I have modified line 19 to&amp;nbsp;&lt;span&gt;CONFIG_BOARD_NRF9160_PCA10090NS.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;added #define&amp;nbsp;CONFIG_BOARD_NRF9160_PCA10090NS at 16 line.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;Changed the name of&amp;nbsp;&lt;span&gt;overlay file to&amp;nbsp;&lt;/span&gt;&lt;span&gt;nrf9160dk_nrf9160ns.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;change at line 46 -&amp;nbsp;&lt;span class="pl-k"&gt;static&lt;/span&gt; &lt;span class="pl-c1"&gt;s16_t&lt;/span&gt; m_sample_buffer[BUFFER_SIZE]; to&amp;nbsp;&lt;span class="pl-k"&gt;static&lt;/span&gt;&amp;nbsp;uint&lt;span class="pl-c1"&gt;16_t&lt;/span&gt; m_sample_buffer[BUFFER_SIZE];&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;These are the changes i have done .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;it shows a warning (assignment discards &amp;#39;const&amp;#39; qualifies from pointer target type [-wdiscarded-qualifiers] ) at line 89&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Runtime error in nrf9160dk ADC program "device_get_binding ADC_0 failed"</title><link>https://devzone.nordicsemi.com/thread/327267?ContentTypeID=1</link><pubDate>Mon, 30 Aug 2021 15:03:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c7144ed-d8cf-48bd-862f-f707df666e3e</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Okay. Please describe all the modifications you&amp;#39;ve made to the sample or it will be hard to help you .&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you for instance changed the board names in the if statement on lines 17 through 20?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/adc/src/main.c#L17"&gt;github.com/.../main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Runtime error in nrf9160dk ADC program "device_get_binding ADC_0 failed"</title><link>https://devzone.nordicsemi.com/thread/327263?ContentTypeID=1</link><pubDate>Mon, 30 Aug 2021 14:32:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d930bdd-6ca1-41c1-8dc5-e7a2690047b9</guid><dc:creator>Shahajas.</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;Yes I have already modified the name of overlay file to&amp;nbsp;&lt;span&gt;nrf9160dk_nrf9160ns.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Shahajas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Runtime error in nrf9160dk ADC program "device_get_binding ADC_0 failed"</title><link>https://devzone.nordicsemi.com/thread/327256?ContentTypeID=1</link><pubDate>Mon, 30 Aug 2021 14:03:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cba4e839-127b-42db-9778-555c3bb32410</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you modified the name of the overlay file? &amp;lt;nrf9160_pca10090&amp;gt; is the old version of the board name, so if you&amp;#39;re building for the current board name (nrf9160dk_nrf9160), the overlay file with its current name won&amp;#39;t be included in the build, i.e the ADC note won&amp;#39;t be set to &amp;quot;okay&amp;quot; and the device binding fails.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Heidi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>