<?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>How exactly do you enable i2c0, i2c1 or i2c3 on the nrf9160 dk?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89425/how-exactly-do-you-enable-i2c0-i2c1-or-i2c3-on-the-nrf9160-dk</link><description>How do you enable any of the i2c peripherals on the nRF9160 dk boards? 
 I tried changing the device overlay to the code below: 
 &amp;amp; i2c0 { 
 
 status = &amp;quot;okay&amp;quot; ; 
 compatible = &amp;quot;nordic,nrf-twim&amp;quot; ; 
 sda-pin = &amp;lt; 12 &amp;gt;; 
 scl-pin = &amp;lt; 11 &amp;gt;; 
 clock-frequency</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Jun 2022 06:27:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89425/how-exactly-do-you-enable-i2c0-i2c1-or-i2c3-on-the-nrf9160-dk" /><item><title>RE: How exactly do you enable i2c0, i2c1 or i2c3 on the nrf9160 dk?</title><link>https://devzone.nordicsemi.com/thread/374656?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2022 06:27:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2153dc8d-cf9c-42d1-8871-ddf547f0cf0d</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello Jerome,&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user=""]How do you enable any of the i2c peripherals on the nRF9160 dk boards?[/quote]
&lt;p&gt;&lt;span&gt;You can check all default configured peripherals in &lt;em&gt;../&amp;lt;your_application_root/&amp;lt;your_build_folder&amp;gt;/zephyr/zephyr.dts&lt;/em&gt;. On the nRF9160 DK, &amp;amp;i2c2 is enabled by default.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;i2c2: arduino_i2c: i2c@a000 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	#address-cells = &amp;lt; 0x1 &amp;gt;;
	#size-cells = &amp;lt; 0x0 &amp;gt;;
	reg = &amp;lt; 0xa000 0x1000 &amp;gt;;
	clock-frequency = &amp;lt; 0x186a0 &amp;gt;;
	interrupts = &amp;lt; 0xa 0x1 &amp;gt;;
	status = &amp;quot;okay&amp;quot;;
	label = &amp;quot;I2C_2&amp;quot;;
	pinctrl-0 = &amp;lt; &amp;amp;i2c2_default &amp;gt;;
	pinctrl-1 = &amp;lt; &amp;amp;i2c2_sleep &amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Due to &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf9160%2Fmemory.html&amp;amp;cp=2_0_0_3_1_1&amp;amp;anchor=topic"&gt;memory instantiation&lt;/a&gt;, you have to disable &amp;amp;uart0 to be able to enable &amp;amp;i2c0 and &amp;amp;spi3 to be able to enable &amp;amp;i2c3 respectively.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Additionally,&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_I2C=y&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;needs to be set in your prj.conf.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Unless you are aware of the fact that you have&amp;nbsp;to switch over to RTT if logging is needed, disabling &amp;amp;uart0 is not recommended from my side.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Markus&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>