<?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>nrf9160 i2c_scanner example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47595/nrf9160-i2c_scanner-example</link><description>Hello, 
 I am working on a custom pcb with nrf9160-SICA. I have UART SPI and GPIOs running fine but I am having a very difficult time with I2c (TWI). 
 Pins 8 and 9 are occupied by switch1 and switch 2 on the nrf9160DK so even simple pin toggle (GPIO</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 May 2019 18:58:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47595/nrf9160-i2c_scanner-example" /><item><title>RE: nrf9160 i2c_scanner example</title><link>https://devzone.nordicsemi.com/thread/188917?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 18:58:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea72c62e-a178-45bd-8c7b-ddfdc1d6bbf7</guid><dc:creator>SuperAbe</dc:creator><description>&lt;p&gt;Thank you Sigurd,&lt;/p&gt;
&lt;p&gt;This example uses &amp;quot;&amp;amp;i2c3&amp;quot;&amp;nbsp; which fixed my issue. and I was using &amp;quot;&amp;amp;i2c2:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/sigurdnev/fw-nrfconnect-nrf/tree/master/samples/nrf9160/i2c_scanner"&gt;https://github.com/sigurdnev/fw-nrfconnect-nrf/tree/master/samples/nrf9160/i2c_scanner&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My .overlay looked like this when it did not work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c2 {
	status = &amp;quot;ok&amp;quot;;
	sda-pin = &amp;lt;9&amp;gt;; 
	scl-pin = &amp;lt;8&amp;gt;; 
	clock-frequency = &amp;lt;I2C_BITRATE_STANDARD&amp;gt;; 
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I saw from UART that my overlay had no effect on SDA and SCL pin:&lt;/p&gt;
&lt;p&gt;Value of NRF_TWIM2_NS-&amp;gt;PSEL.SCL: 15&amp;nbsp; //should be 8&lt;br /&gt;Value of NRF_TWIM2_NS-&amp;gt;PSEL.SDA: 13&amp;nbsp; //should be 9&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I switched to &amp;amp;i2c3 and now everything works very well.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you again&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 i2c_scanner example</title><link>https://devzone.nordicsemi.com/thread/188640?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 15:55:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d90b876-ba0e-4a41-9c23-02fff6eff335</guid><dc:creator>SuperAbe</dc:creator><description>&lt;p&gt;I will try this sample and let you know how it goes.&lt;/p&gt;
&lt;p&gt;I have the same issue with other pins (11, 12, 13, 20).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 i2c_scanner example</title><link>https://devzone.nordicsemi.com/thread/188516?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 10:52:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d5f83ae-1690-48cf-8508-a0f23dd336c1</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Try the sample in the master branch instead,&amp;nbsp;&lt;a href="https://github.com/sigurdnev/fw-nrfconnect-nrf/tree/master/samples/nrf9160/i2c_scanner"&gt;https://github.com/sigurdnev/fw-nrfconnect-nrf/tree/master/samples/nrf9160/i2c_scanner&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Do you only see this issue with pin 8 and 9? does it work with other pins ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>