<?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>Need help with I2C2 on NRF9160DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82654/need-help-with-i2c2-on-nrf9160dk</link><description>I&amp;#39;m trying to get basic i2c code working on my Nordic nFR9160DK board. I&amp;#39;m new to the platform and have been doing a lot of reading and searching through examples. Through these efforts, I&amp;#39;ve managed to scrape together some code that I&amp;#39;m hoping is close</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Dec 2021 10:23:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82654/need-help-with-i2c2-on-nrf9160dk" /><item><title>RE: Need help with I2C2 on NRF9160DK</title><link>https://devzone.nordicsemi.com/thread/343112?ContentTypeID=1</link><pubDate>Mon, 13 Dec 2021 10:23:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8899d98a-7880-4143-a13b-0874dda0a57d</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;Hello Robert,&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Again, the error I&amp;#39;m getting is &amp;quot;&lt;span&gt;&amp;#39;DT_N_ALIAS_i2c_2_P_label&amp;#39; undeclared&amp;quot;. I understand from my reading that this is a generated macro, but beyond that my knowledge is a bit hazy. The error seems to originate at the following line in main.c&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;I suggest you to use the following line instead:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define I2C_DEV DT_LABEL(DT_NODELABEL(i2c2))&lt;/pre&gt;&lt;/p&gt;
[quote user=""]nrf9160_pca10090ns.overlay[/quote]
&lt;p&gt;If you want&amp;nbsp;the overlay file to be considered for your nRF9160 DK, you have to rename it to &lt;em&gt;nrf9160dk_nrf9160_ns&lt;/em&gt; in NCS v.1.7.x.&lt;/p&gt;
&lt;p&gt;I hope this will help you!&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>