<?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 DK I2C only receives the first byte with BME280</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49817/nrf9160-dk-i2c-only-receives-the-first-byte-with-bme280</link><description>I am trying to read temperature, pressure, and humidity data from an Adafruit BME280 sensor using the nRF9160 DK. The communication protocol that I am using is I2C and I am reading the data with the Zephyr RTOS function i2c_burst_read(). The problem that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Nov 2019 10:14:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49817/nrf9160-dk-i2c-only-receives-the-first-byte-with-bme280" /><item><title>RE: nRF9160 DK I2C only receives the first byte with BME280</title><link>https://devzone.nordicsemi.com/thread/222286?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 10:14:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d5c0093-00de-4bd0-9433-1c3dc9d9d3e8</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi, &lt;a href="https://devzone.nordicsemi.com/members/funicello-nicola"&gt;Funyc&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Could you please open a new ticket?&lt;/p&gt;
&lt;p&gt;At the moment, when a ticket has a &amp;quot;verified answer&amp;quot;, it does not appear back in our list of open tickets, so it is hard for us to keep track.&lt;/p&gt;
&lt;p&gt;Also, in your ticket, please provide your overlay file and configuration file to help us identify your problem.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK I2C only receives the first byte with BME280</title><link>https://devzone.nordicsemi.com/thread/222157?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 15:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baafa2b4-c8e4-451e-9907-f5776bdb3c35</guid><dc:creator>Funyc</dc:creator><description>&lt;p&gt;I have a similar error:&lt;/p&gt;
&lt;p&gt;2&amp;gt; In file included from C:/nordicsdk/ncs/zephyr/include/drivers/sensor.h:23:0,&lt;br /&gt;2&amp;gt; from C:/nordicsdk/ncs/zephyr/drivers/sensor/bme280/bme280.c:11:&lt;br /&gt;2&amp;gt; C:/nordicsdk/ncs/zephyr/drivers/sensor/bme280/bme280.c:384:29: error: &amp;#39;DT_INST_0_BOSCH_BME280_LABEL&amp;#39; undeclared here (not in a function); did you mean &amp;#39;DT_INST_0_SOC_NV_FLASH_LABEL&amp;#39;?&lt;br /&gt;2&amp;gt; C:/nordicsdk/ncs/zephyr/include/device.h:107:11: note: in definition of macro &amp;#39;DEVICE_AND_API_INIT&amp;#39;&lt;br /&gt;Build failed&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I think that I used the same procedure&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK I2C only receives the first byte with BME280</title><link>https://devzone.nordicsemi.com/thread/200398?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 06:27:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61e7f2b8-99ee-4018-bab8-9587e4b25078</guid><dc:creator>dvldogg13</dc:creator><description>&lt;p&gt;Is there a way to change the power mode of the BME280 if I am using the driver from Zephyr?&amp;nbsp; I want to be able to use Forced mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK I2C only receives the first byte with BME280</title><link>https://devzone.nordicsemi.com/thread/199057?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2019 15:51:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54ca1b1b-c7cd-4e68-929d-3206c2a9566c</guid><dc:creator>dvldogg13</dc:creator><description>&lt;p&gt;Thank you.&amp;nbsp; I changed everything to i2c_2 and it worked.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK I2C only receives the first byte with BME280</title><link>https://devzone.nordicsemi.com/thread/198877?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2019 08:13:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca9d4817-83f7-4c45-a88e-ce54e6ae6a71</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It should say &amp;quot;label&amp;quot; in the overlay file, not &amp;quot;lable&amp;quot;. This should fix the undeclared DT_BOSCH_BME280_0_LABEL error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The sample should run without any modifications, but the sensor must be connected and the details in the overlay and configuration file must be correct. Please make sure that the pins and address in the overlay file is correct (the I2C slave address is listed both after the &amp;quot;@&amp;quot; in the node name and in the &amp;quot;reg&amp;quot; field).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If your application is running in non-secure mode the I2C must be set up to be used in non-secure mode. You can either try to build the application for the nrf9160_pca10090 (not ns) board to run the application in secure mode, or you must make sure that the I2C/TWIM peripheral is configured correctly. From your output it looks like TWIM2 is configured for non-secure use, so you could try to change i2c3 to i2c2 in the overlay file and CONFIG_I2C_3 to CONFIG_I2C_2 in the configuration file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK I2C only receives the first byte with BME280</title><link>https://devzone.nordicsemi.com/thread/198816?ContentTypeID=1</link><pubDate>Tue, 16 Jul 2019 21:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93eef89e-bf52-4711-818c-e2010e64226e</guid><dc:creator>dvldogg13</dc:creator><description>&lt;p&gt;Thank you for the response.&amp;nbsp; After I add the overlay file and add the line to the prj.conf file, do I still need to configure the nRF9160 board in the main.c file?&amp;nbsp; Or should I be able to run it as is?&lt;/p&gt;
&lt;p&gt;When I built, I got an error on line 385 of the bme280.c file stating that DT_BOSCH_BME280_0_LABEL is undeclared and asked if it meant DT_BOSCH_BME280_0, so I changed it to that.&amp;nbsp; After, I was able to build without errors.&amp;nbsp; I attempted to run the program, but the following screenshot shows what happens.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-_2800_135_2900_.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK I2C only receives the first byte with BME280</title><link>https://devzone.nordicsemi.com/thread/198770?ContentTypeID=1</link><pubDate>Tue, 16 Jul 2019 15:23:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2bde781-647a-4dc2-92b9-25b0e94310a9</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Zephyr has a driver for interfacing with the BME280. Take a look at their sample in the ncs/zephyr/samples/sensors/bme280 folder.&lt;/p&gt;
&lt;p&gt;In order to run the sample on the nRF9160DK you have to add your own overlay file (nrf9160_pca10090.overlay):&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c3 {
    status = &amp;quot;ok&amp;quot;;
    sda-pin = &amp;lt;12&amp;gt;;
    scl-pin = &amp;lt;11&amp;gt;;
    
    bme280@76 {
        compatible = &amp;quot;bosch,bme280&amp;quot;;
        reg = &amp;lt;0x76&amp;gt;;
        label = &amp;quot;BME280&amp;quot;;
    };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You must also add the following lines in the prj.conf file in order to enable I2C:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_I2C_3=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best reagrds,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>