<?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>SHT31 readout on nRF9160 using the Zephyr Sample</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70614/sht31-readout-on-nrf9160-using-the-zephyr-sample</link><description>Dear Devzone Community, 
 when trying to get the Zephyr SHT31 Sample running, I stumbled across an error which I was not able to resolve. 
 I did the following: 
 
 Add nrf9160dk_nrf9160ns.overlay in zephyr\samples\sensor\sht3xd\boards with following</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Jan 2021 11:56:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70614/sht31-readout-on-nrf9160-using-the-zephyr-sample" /><item><title>RE: SHT31 readout on nRF9160 using the Zephyr Sample</title><link>https://devzone.nordicsemi.com/thread/290230?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 11:56:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c20c9113-3030-40b4-8376-9661972d42bc</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;No problem, I&amp;#39;m happy to help, and glad you made it work &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SHT31 readout on nRF9160 using the Zephyr Sample</title><link>https://devzone.nordicsemi.com/thread/290207?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 10:53:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90fb7a0d-5b8b-44db-b1c0-e3a46773ad42</guid><dc:creator>Christian Zingl</dc:creator><description>&lt;p&gt;Thank you very much for your help! This resolved the problem and the sensor works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SHT31 readout on nRF9160 using the Zephyr Sample</title><link>https://devzone.nordicsemi.com/thread/290146?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 08:49:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7179911a-c2d1-4d0d-9082-c01f8c7f6abe</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Try to add the following content to&amp;nbsp;&lt;span&gt;nrf9160dk_nrf9160ns.overlay, that should compile fine&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c2 { /* SDA P0.26, SCL P0.27, ALERT P1.10 */
    status = &amp;quot;okay&amp;quot;;
    compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
    sda-pin = &amp;lt; 30 &amp;gt;;
    scl-pin = &amp;lt; 31 &amp;gt;;
    sht3xd@44 {
		compatible = &amp;quot;sensirion,sht3xd&amp;quot;;
		reg = &amp;lt;0x44&amp;gt;;
		label = &amp;quot;SHT3XD&amp;quot;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Explanation:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The reason it failed initially was because you hadn&amp;#39;t enabled the i2c0 node (status=&amp;quot;okay&amp;quot;), in addition you need to add the required fields compatible, sda-pin and scl-pin. However, since both uart0 and uart1 is enabled in &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/b62d4210d87673f3872068c87f64803f52170fab/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common.dts#L90-L106"&gt;ncs\v1.4.0\zephyr\boards\arm\nrf9160dk_nrf9160\nrf9160dk_nrf9160_common.dts&lt;/a&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;you can&amp;#39;t use i2c0 or i2c1, since they occupy the same memory. Instance i2c2 should be fine to use, however for that instance, &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/b62d4210d87673f3872068c87f64803f52170fab/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common.dts#L114-L117"&gt;all the fields are already set&lt;/a&gt;, so it&amp;#39;s not really necessary to set them again in the overlay file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>