<?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>BME680 sample on nRF5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74876/bme680-sample-on-nrf5340</link><description>Hi, 
 I am trying to interface a BME680 sensor with my nRF5340 DK. I am trying to get the following sample to run (I left everything default): https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/sensor/bme680/README.html 
 When</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 08 May 2021 13:58:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74876/bme680-sample-on-nrf5340" /><item><title>RE: BME680 sample on nRF5340</title><link>https://devzone.nordicsemi.com/thread/308825?ContentTypeID=1</link><pubDate>Sat, 08 May 2021 13:58:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b9ad726-9470-41cb-8666-ac4625a77179</guid><dc:creator>langestefann</dc:creator><description>&lt;p&gt;0x77 did the trick, I can read the sensor now! thank you so much!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME680 sample on nRF5340</title><link>https://devzone.nordicsemi.com/thread/308824?ContentTypeID=1</link><pubDate>Sat, 08 May 2021 13:53:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7c04846-e091-4e46-a6be-597c7551d43c</guid><dc:creator>bigbear</dc:creator><description>&lt;p&gt;I think the overlay file is being read correctly, the compiler would tell you otherwise.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;code&gt;&lt;span&gt;device_get_binding()&lt;/span&gt;&lt;/code&gt;&lt;span&gt; function is returning you a NULL pointer which means it couldnt find the device. So my guess would be that the connection is not correct or the address is wrong.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you check if the SDA/SCL pins and the BME680&amp;nbsp;address are correct? If I remember correctly, the BME680&amp;#39;s default address is &lt;code&gt;0x77&lt;/code&gt; instead of &lt;code&gt;0x76&lt;/code&gt; (which you can set to with a jumper). So that would be my bet here &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;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME680 sample on nRF5340</title><link>https://devzone.nordicsemi.com/thread/308823?ContentTypeID=1</link><pubDate>Sat, 08 May 2021 12:25:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3b91467-8f63-4672-b533-6c25a4a80d1c</guid><dc:creator>langestefann</dc:creator><description>&lt;p&gt;That indeed did the trick. I thought the &amp;#39;clean&amp;nbsp;solution&amp;#39; command removed that folder but I guess it didn&amp;#39;t do it (completely).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now for the next challenge. I now see the following output looping:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.4.99-ncs1  ***
Device (nil) name is &amp;lt;
*** Booting Zephyr OS build v2.4.99-ncs1  ***
Device (nil) name is &amp;lt;
*** Booting Zephyr OS build v2.4.99-ncs1  ***
Device (nil) name is &amp;lt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It seems like it is not reading the overlay file properly? And then it reboots with no error.&lt;/p&gt;
&lt;p&gt;These are the contents of the overlay file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf5340dk_nrf5340_cpuapp.overlay

/*
 * Copyright (c) 2020, Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */

&amp;amp;i2c1 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	sda-pin = &amp;lt; 30 &amp;gt;; //P0.30
	scl-pin = &amp;lt; 31 &amp;gt;; //P0.31
    clock-frequency = &amp;lt;I2C_BITRATE_STANDARD&amp;gt;; 
	
	bme680@76 {
		compatible = &amp;quot;bosch,bme680&amp;quot;;
		reg = &amp;lt;0x76&amp;gt;;
		label = &amp;quot;BME680&amp;quot;;
	};
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME680 sample on nRF5340</title><link>https://devzone.nordicsemi.com/thread/308811?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 20:12:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ef535a1-023b-4e7d-84c8-31923a9a3c3c</guid><dc:creator>bigbear</dc:creator><description>&lt;p&gt;I just tried, for me it actually compiles after renaming the overlay file. Have you deleted the build folder before running west build?&lt;br /&gt;&lt;br /&gt;Is there a particular reason why you want to use non-secure?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME680 sample on nRF5340</title><link>https://devzone.nordicsemi.com/thread/308808?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 19:19:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fc97c61-1610-4e91-bc98-f8430e1c2ec8</guid><dc:creator>langestefann</dc:creator><description>&lt;p&gt;I just tested this, it leads to the same error again. I even tried renaming &lt;code&gt;&lt;span&gt;nrf5340dk_nrf5340_cpuapp.overlay&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;to&amp;nbsp;&lt;code&gt;nrf5340dk_nrf5340_cpuappns.overlay&amp;nbsp;&lt;/code&gt;&lt;/span&gt;but that didn&amp;#39;t help. Not sure if this has something to do with how it&amp;#39;s being compiled or it can&amp;#39;t find the overlay file if I switch to non secure?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME680 sample on nRF5340</title><link>https://devzone.nordicsemi.com/thread/308807?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 19:01:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b5a87ba-1346-4206-8074-b10ea33231db</guid><dc:creator>bigbear</dc:creator><description>&lt;p&gt;I guess you can use either &lt;code&gt;cpuapp&lt;/code&gt; or &lt;code&gt;cpuappns&lt;/code&gt;, depending if you want to execute from the secure area or not.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME680 sample on nRF5340</title><link>https://devzone.nordicsemi.com/thread/308805?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 18:29:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47dc3799-d95e-408a-b2bc-0d98041e83ed</guid><dc:creator>langestefann</dc:creator><description>&lt;p&gt;That seems to have done the trick, it compiles now, thank you! But I am a little bit confused, why did you use &lt;em&gt;cpuapp&lt;/em&gt; and not &lt;em&gt;cpuappns&lt;/em&gt; ? Thanks a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BME680 sample on nRF5340</title><link>https://devzone.nordicsemi.com/thread/308801?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 18:18:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c464daf1-a6c8-4cca-87a6-e52c76d121af</guid><dc:creator>bigbear</dc:creator><description>&lt;p&gt;Yes, you need to configure the device tree overlay for your board.&amp;nbsp;Go to the sample folder -&amp;gt; boards and check out the pre-configured overlay files.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Assuming that you are using the nrf5340dk and building on the&amp;nbsp;cpuapp-core, create an overlay file&amp;nbsp;&lt;code&gt;nrf5340dk_nrf5340_cpuapp.overlay&lt;/code&gt; inside the boards folder. You can copy the content from the nrf52840dk overlay file, but change &lt;code&gt;&amp;amp;i2c0&lt;/code&gt; to &lt;code&gt;&amp;amp;i2c1&lt;/code&gt; because that is the one which the cpuapp core is using.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After that the example should build.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>