<?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 to use nrf9160 i2c1?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93677/how-to-use-nrf9160-i2c1</link><description>Hi: 
 How to use nrf9160 i2c1? 
 nrf9160dk_nrf9160_ns.overlay 
 
 I2C1 cannot be used when I configure it like this.But i2c2 can be used.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Nov 2022 20:20:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93677/how-to-use-nrf9160-i2c1" /><item><title>RE: How to use nrf9160 i2c1?</title><link>https://devzone.nordicsemi.com/thread/395005?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2022 20:20:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a272ca00-1866-4496-94f6-bd9cda87b3bd</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;That&amp;#39;s because I2C1 is by default disabled on nRF9160, while I2C2 is enabled by default.&lt;/p&gt;
&lt;p&gt;If you search for i2c1 in &lt;code&gt;ncs/zephyr/dts/arm/nordic/nrf9160_common.dtsi&lt;/code&gt; you will find the following snippet:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;i2c1: i2c@9000 {
	/*
	 * This i2c node can be either TWIM or TWIS, for the user to pick:
	 * compatible = &amp;quot;nordic,nrf-twim&amp;quot; or
	 *              &amp;quot;nordic,nrf-twis&amp;quot;.
	 */
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	#address-cells = &amp;lt;1&amp;gt;;
	#size-cells = &amp;lt;0&amp;gt;;
	reg = &amp;lt;0x9000 0x1000&amp;gt;;
	clock-frequency = &amp;lt;I2C_BITRATE_STANDARD&amp;gt;;
	interrupts = &amp;lt;9 NRF_DEFAULT_IRQ_PRIORITY&amp;gt;;
	status = &amp;quot;disabled&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Where it says &lt;code&gt;status = &amp;quot;disabled&amp;quot;;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To enable it you have to add the following to your overlay file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c1 {
    status = &amp;quot;okay&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>