<?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>Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42146/migrating-a-design-from-raspberry-pi-zero-to-nrf9160-dk---need-i2c-and-spi-interfaces</link><description>Hi, 
 I have developed a simple system based around a Raspberry Pi Zero. The system uses a couple of sensors to measure temperature and water pressure using a ADS51115 A/D and a MAX 31865 RTD to digital convertor. These connect to the Pi zero via the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Jul 2020 08:02:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42146/migrating-a-design-from-raspberry-pi-zero-to-nrf9160-dk---need-i2c-and-spi-interfaces" /><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/261315?ContentTypeID=1</link><pubDate>Thu, 23 Jul 2020 08:02:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76f59374-adff-4bef-8dba-52940d4c2829</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It means that a maximum of 4 of these serial instances can be used at the same time. However, the nrfx drivers have a feature called PRS (Peripheral Resource&amp;nbsp;Sharing) that allows you to switch instances on and off runtime as you need them.&lt;/p&gt;
&lt;p&gt;Disclaimer: I have not used the PRS recently myself, and the below information is based on documentation. I&amp;#39;ll update this comment when I get the chance to do a proper test and confim that the below information is correct.&lt;/p&gt;
&lt;p&gt;If you use nrfx drivers directly, this is achieved by enabling NRFX_PRS on the serial boxes where you want them, and then calling init()/uninit() functions beore and after transactions. Here&amp;#39;s the API docs:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/group__nrfx__prs.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/group__nrfx__prs.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: There is a mechanism in the device tree parsing that prevents multiple instances for the same serial box from being enabled at the same time, leaving the suggested workaround below unusable. I will check more in this and comment here when I have more information.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;If you are using NCS, and don&amp;#39;t want to use nrfx drivers directly, but rather Zephyr&amp;#39;s drivers, you will have to use the device power management features to switch an instance on and off (euivalent to calling init()/uninit()). I am not sure about the implications using PRS might have on device tree configuration, and how driver initialization in Zephyr works. I have not tested this myself.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s documentation for the related Kconfigs:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.3.0/kconfig/CONFIG_NRFX_PRS.html"&gt;CONFIG_NRFX_PRS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.3.0/kconfig/CONFIG_NRFX_PRS_BOX_0.html#cmdoption-arg-config-nrfx-prs-box-0"&gt;CONFIG_NRFX_PRS_BOX_0&lt;/a&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/CONFIG_NRFX_PRS.html"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.3.0/kconfig/CONFIG_DEVICE_POWER_MANAGEMENT.html"&gt;CONFIG_DEVICE_POWER_MANAGEMENT&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Docs on device power management is found &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.3.0/zephyr/reference/power_management/index.html?highlight=config_device_power_management"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To enable a peripheral, use&amp;nbsp;&lt;span&gt;DEVICE_PM_ACTIVE_STATE.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To disable it, use on of these three states:&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;span&gt;DEVICE_PM_LOW_POWER_STATE,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;DEVICE_PM_SUSPEND_STATE or&amp;nbsp;&lt;/span&gt;&lt;/span&gt;DEVICE_PM_OFF_STATE.&lt;/p&gt;
&lt;div&gt;Let us know if you run into any issues.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Best regards,&lt;/div&gt;
&lt;div&gt;Jan Tore&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/261306?ContentTypeID=1</link><pubDate>Thu, 23 Jul 2020 07:21:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4acb785-6557-4426-baec-1f7b73034b77</guid><dc:creator>duxinglang</dc:creator><description>&lt;p&gt;&lt;span&gt;Does this mean that, although NRF9160 has 4 SPI, 4 I2C and 4 UART on the datasheet, it is actually not the same as using 3X4=12 peripheral interfaces at the same time, and can only use 4 peripheral interfaces at most?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/179555?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 14:59:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69d2a7d5-7588-4cff-a076-eef86561a23e</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Jan,&lt;/p&gt;
&lt;p&gt;OK, that works!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/179502?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 12:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e3cd50b-26b7-4af3-acda-32876dd3d3f4</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;d just remove the -DSHIELD altogether, as you&amp;#39;ve already added the BME280 to the PCA10090 overlay. You can also define which pins to use as shown in an earlier reply in this thread in that same overlay. The alternative is as you mention to add an overlay called bme280.overlay and set -DSHIELD=bme280.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Jan Tore&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/179486?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 12:15:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48370131-991b-4cf1-b34b-5ac1e18e6084</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Jan,&lt;/p&gt;
&lt;p&gt;Replying to this as your latest comments don&amp;#39;t have an associated reply button.&lt;/p&gt;
&lt;p&gt;Yes, I am connecting the BME280 to the 9160 DK. As per your previous reply, I created an overlay file, which I called nrf9160_pca10090.overlay and added the I2C and SPI code above.&lt;/p&gt;
&lt;p&gt;I then try to build this with the command&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span&gt;cmake -GNinja -DSHIELD=nrf9160_pca10090 -DBOARD=nrf9160_pca10090 ..&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I get an error&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Zephyr version: 1.14.0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-- Found PythonInterp: /usr/local/bin/python3 (found suitable version &amp;quot;3.7.3&amp;quot;, minimum required is &amp;quot;3.4&amp;quot;)&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-- Selected BOARD nrf9160_pca10090&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;No shield named &amp;#39;nrf9160_pca10090&amp;#39; found&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;So, are you suggesting that I create a&amp;nbsp;&lt;/span&gt;shield called BME280.overlay which contain the I2C and SPI code above and then build using&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;cmake -GNinja -DSHIELD=BME280 -DBOARD=nrf9160_pca10090 ..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rod&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Sorry, I thought I ad replied to this earlier, but my replay seems to have disappeared.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/179384?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 06:24:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d968224-cf23-424c-892f-2f056e678cf2</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I might be misunderstanding here, but it looks liek you&amp;#39;re trying to use&amp;nbsp;another nRF91 DK as a shield. If you build without the -DSHIELD option, this should work.&amp;nbsp;If you have a (BME280?) shield connected to your board, you can create an overlay with its name like you did for the board. Then you can feed the shield name into the build system using -DSHIELD.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please correct me if I&amp;#39;m not understanding what you want to achieve.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jan Toe&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/179369?ContentTypeID=1</link><pubDate>Sun, 31 Mar 2019 20:07:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8d0e7bc-9e41-48f3-940b-e4b9c7690253</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Thanks Jan,&lt;/p&gt;
&lt;p&gt;OK, I have created an overly file, nrf9160_pca10090.overlay and have added the code as detailed in your message above. This is in my application directory&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Watts-MacBook-Pro:BME280_Test_Code Watt$ ls&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CMakeLists.txt&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;prj_spi.conf&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;build&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;sample.yaml&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nrf9160_pca10090.overlay&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;src&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;prj.conf&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;When I try to build&lt;/p&gt;
&lt;p&gt;&lt;span&gt;cmake -GNinja -DSHIELD=nrf9160_pca10090 -DBOARD=nrf9160_pca10090 ..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I get an error&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Zephyr version: 1.14.0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-- Found PythonInterp: /usr/local/bin/python3 (found suitable version &amp;quot;3.7.3&amp;quot;, minimum required is &amp;quot;3.4&amp;quot;)&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-- Selected BOARD nrf9160_pca10090&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;No shield named &amp;#39;nrf9160_pca10090&amp;#39; found&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Any ideas?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/176920?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2019 09:41:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d0d9fc2-4a6a-4733-887a-3f6ba4493b33</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Thank you Jan, really appreciate your help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/176867?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2019 07:07:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45a939b8-e93b-4e1f-b370-bf07ba51e473</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It looks like what you&amp;#39;re seeing here is because the BME280 is not set up to be attached to one of your serial buses. The BME280 driver is configured to use automatically generated information from the device tree to determine which serial bus and other HW configuration to use. Every macro starting with `DT_` originates from the device tree, meaning .dts and .overlay files. So, the device tree needs to contain information about BME280. That&amp;#39;s done by adding it to your .overlay file (named the same as your board). If you have BME280 on the I2C bus, it would look like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;&amp;amp;i2c2 {
    /* Your bus configuration goes here */

    /* The I2C address could be one of two, here 0x76 is assumed */
	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;br /&gt;&lt;br /&gt;And for SPI something like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;&amp;amp;spi3 {
    /* Bus configuration here */

	bme280@0 {
		compatible = &amp;quot;bosch,bme280&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		spi-max-frequency = &amp;lt;8000000&amp;gt;;
		label = &amp;quot;BME280&amp;quot;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Hopefully that would get you started.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jan Tore&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/176826?ContentTypeID=1</link><pubDate>Mon, 18 Mar 2019 23:08:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10d937e9-2fba-4438-913d-b5840f04e6eb</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Jan,&lt;/p&gt;
&lt;p&gt;Finally I have had the opportunity to get back to this. (Im doing this work as a side line!) Anyway, I have Zephyr now running on the board and have verified my tool chain with the standard hello World example. Next, I want to try my first sensor, the BME280. I was pleased to see there is already example code there. I added the overlay fine as you suggested above. Please can you tell me what the proper syntax is for defining the sensor. I get the error below. I guess I need to define the sensor either in my config or overlay file? Sorry, I appreciate this is quite basic stuff, Im a h/w guy in a s/w world!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Watts-MacBook-Pro:build Watt$ ninja&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[102/109] Building C object zephyr/drivers/sensor/bme280/CMakeFiles/drivers__sensor__bme280.dir/bme280.c.obj&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;FAILED: zephyr/drivers/sensor/bme280/CMakeFiles/drivers__sensor__bme280.dir/bme280.c.obj&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ccache /Users/Watt/gnuarmemb/bin/arm-none-eabi-gcc -DBUILD_VERSION=v1.14.0-rc1-1246-g959abdf1c9c9 -DKERNEL -DNRF9160_XXAA -D_FORTIFY_SOURCE=2 -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -I../../../../kernel/include -I../../../../arch/arm/include -I../../../../include -I../../../../include/drivers -Izephyr/include/generated -I../../../../soc/arm/nordic_nrf/nrf91 -I../../../../soc/arm/nordic_nrf/include -I../../../../lib/libc/minimal/include -I../../../../ext/hal/cmsis/Include -I../../../../ext/hal/nordic/nrfx -I../../../../ext/hal/nordic/nrfx/drivers/include -I../../../../ext/hal/nordic/nrfx/hal -I../../../../ext/hal/nordic/nrfx/mdk -I../../../../ext/hal/nordic/. -isystem /Users/Watt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include -isystem /Users/Watt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/include-fixed -Os -nostdinc -g -Wall -Wformat -Wformat-security -Wno-format-zero-length -imacros /Users/Watt/zephyrproject/zephyr/samples/sensor/bme280/build/zephyr/include/generated/autoconf.h -ffreestanding -Wno-main -fno-common -mthumb -mcpu=cortex-m33 -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -Wno-pointer-sign -Wno-unused-but-set-variable -fno-reorder-functions -fno-defer-pop -Werror=implicit-int -Wpointer-arith -ffunction-sections -fdata-sections -mabi=aapcs -march=armv8-m.main+dsp -std=c99 -MD -MT zephyr/drivers/sensor/bme280/CMakeFiles/drivers__sensor__bme280.dir/bme280.c.obj -MF zephyr/drivers/sensor/bme280/CMakeFiles/drivers__sensor__bme280.dir/bme280.c.obj.d -o zephyr/drivers/sensor/bme280/CMakeFiles/drivers__sensor__bme280.dir/bme280.c.obj &lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;-c /Users/Watt/zephyrproject/zephyr/drivers/sensor/bme280/bme280.c&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In file included from /Users/Watt/zephyrproject/zephyr/drivers/sensor/bme280/bme280.c:24:0:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;/Users/Watt/zephyrproject/zephyr/drivers/sensor/bme280/bme280.h:111:2: error: #error &amp;quot;BME280 device type not specified&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;#error &amp;quot;BME280 device type not specified&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;^~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;/Users/Watt/zephyrproject/zephyr/drivers/sensor/bme280/bme280.c: In function &amp;#39;bme280_init&amp;#39;:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;/Users/Watt/zephyrproject/zephyr/drivers/sensor/bme280/bme280.c:357:22: warning: unused variable &amp;#39;data&amp;#39; [-Wunused-variable]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;struct bme280_data *data = dev-&amp;gt;driver_data;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In file included from ../../../../include/sensor.h:23:0,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;from /Users/Watt/zephyrproject/zephyr/drivers/sensor/bme280/bme280.c:11:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;/Users/Watt/zephyrproject/zephyr/drivers/sensor/bme280/bme280.c: At top level:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;/Users/Watt/zephyrproject/zephyr/drivers/sensor/bme280/bme280.c:385:29: error: &amp;#39;DT_BOSCH_BME280_0_LABEL&amp;#39; undeclared here (not in a function); did you mean &amp;#39;DT_FLASH_AREA_0_LABEL&amp;#39;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;DEVICE_AND_API_INIT(bme280, DT_BOSCH_BME280_0_LABEL, bme280_init, &amp;amp;bme280_data,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;../../../../include/device.h:107:11: note: in definition of macro &amp;#39;DEVICE_AND_API_INIT&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;.name = drv_name, .init = (init_fn), &lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;\&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;^~~~~~~~&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ninja: build stopped: subcommand failed.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/166777?ContentTypeID=1</link><pubDate>Mon, 21 Jan 2019 10:20:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b9cd94d-03ad-4c57-a8f1-cde6ac906061</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Jeff,&lt;/p&gt;
&lt;p&gt;I see that you have made a &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/42736/problems-with-spi-on-nrf9160-and-zephyr"&gt;new case&lt;/a&gt; regarding this, great!&lt;br /&gt;We will follow up your issue there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/166361?ContentTypeID=1</link><pubDate>Thu, 17 Jan 2019 19:52:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f5779a0-dae3-448f-b6e9-67a79cc6d3c8</guid><dc:creator>Jeff Seaman</dc:creator><description>&lt;p&gt;Did you get the SPI to function on the nRF9160 I have done the setup and ried running a version of the sample code.&amp;nbsp; I do get a device pointer back, but when I try to write to the SPI device I do not see any activity on the pins, I am looking fro the clock signal as a first step the I would connect a AT25SF041-SSHD flash memory chip for testing.&amp;nbsp; Also I was not seeing in the sample code where the chip select lins was asserted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/164485?ContentTypeID=1</link><pubDate>Tue, 08 Jan 2019 10:11:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f80bd497-306b-4945-a3c0-461b88ee3abf</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;ol&gt;
&lt;li&gt;In general, yes, any GPIO can be used. Some pins have dedicated functionality on the dev kit which is shown in a table on the back of the kit, so you might want to avoid them as a convenience, but they&amp;rsquo;re usable if you need them.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;UART, I2C, SPI etc should work fine. Note that some peripherals share the same addresses, as shown by having the same peripheral ID in this table, so that needs to be kept in mind:&lt;br /&gt; &lt;a href="https://www.nordicsemi.com/DocLib/Content/Product_Spec/nRF9160/latest/memory#topic"&gt;https://www.nordicsemi.com/DocLib/Content/Product_Spec/nRF9160/latest/memory#topic&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/164476?ContentTypeID=1</link><pubDate>Tue, 08 Jan 2019 09:55:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4755577-40af-47ca-985d-8eac2b749dd7</guid><dc:creator>RodWatt</dc:creator><description>&lt;div&gt;Jan, thank you for your reply. A couple &amp;nbsp;of follow on questions.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;1. Am I correct in saying that I can assign any GPIO pins as SPI and I2C interfaces?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;2. As part of my development process, I want to phase in the replacement of the Raspberry Pi.&amp;nbsp;In the next version on the prototype, I would like to keep the Pi zero and add the nRF9160DK effectively as a peripheral.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;So, please can you advise how I can add the nRF9160DK as a peripheral to the Pi. Do I just connect over UART or can you suggest a better way?&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/164422?ContentTypeID=1</link><pubDate>Tue, 08 Jan 2019 07:29:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28b9b8ea-f106-4deb-9daf-416d5ffae990</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/rodwatt"&gt;RodWatt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In order to use SPI and I2C peripherals, the&amp;nbsp;following configurations can be placed in `prj.conf` to enable them and select the nrfx driver:&lt;br /&gt;&lt;br /&gt;CONFIG_I2C=y&lt;br /&gt;CONFIG_I2C_NRFX=y&lt;br /&gt;CONFIG_I2C_2=y&lt;br /&gt;CONFIG_I2C_2_NRF_TWIM=y&lt;br /&gt;&lt;br /&gt;CONFIG_SPI=y&lt;br /&gt;CONFIG_SPI_NRFX=y&lt;br /&gt;CONFIG_SPI_3=y&lt;br /&gt;CONFIG_SPI_3_NRF_SPIM=y&lt;br /&gt;&lt;br /&gt;This will enable I2C instance 2 and SPI instance 3, configure them to use nrfx driver. Note that these are the ones declared in the default secure boot to be available for a non-secure application:&lt;br /&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/samples/nrf9160/secure_boot/src/main.c#L321"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/samples/nrf9160/secure_boot/src/main.c#L321&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can choose other instances as long as you also adjust which peripherals are set as non-secure.&lt;/p&gt;
&lt;p&gt;You then need to defined the peripherals in an overlay file for the board where you can set the pin numbers and clock speed. Name it `nrf9160_pca10090.overlay` and place it in the application folder. The contents of the file may be as follows:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;amp;i2c2 {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status = &amp;quot;ok&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sda-pin = &amp;lt;30&amp;gt;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scl-pin = &amp;lt;31&amp;gt;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clock-frequency = &amp;lt;I2C_BITRATE_FAST&amp;gt;;&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;&amp;amp;spi3 {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status = &amp;quot;ok&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sck-pin = &amp;lt;6&amp;gt;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mosi-pin = &amp;lt;7&amp;gt;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; miso-pin = &amp;lt;8&amp;gt;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spi-max-frequency = &amp;lt;4000000&amp;gt;;&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;The devices get the labels &amp;quot;I2C_2&amp;quot; and &amp;quot;SPI_3&amp;quot; to be used in the `device_get_binding()` call, according to their instance numbers.&lt;br /&gt;&lt;br /&gt;When you have the configuration set, you will be able to use the generic I2C and SPI drivers in Zephyr, and can build use those samples and the API documentation as reference:&lt;br /&gt;&lt;br /&gt;I2C API:&lt;br /&gt;&lt;a href="https://docs.zephyrproject.org/latest/api/io_interfaces.html#i2c-interface"&gt;https://docs.zephyrproject.org/latest/api/io_interfaces.html?#i2c-interface&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;SPI API:&lt;br /&gt;&lt;a href="https://docs.zephyrproject.org/latest/api/io_interfaces.html#spi-interface"&gt;https://docs.zephyrproject.org/latest/api/io_interfaces.html?#spi-interface&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Samples:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/tree/master/samples/drivers"&gt;https://github.com/zephyrproject-rtos/zephyr/tree/master/samples/drivers&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/163950?ContentTypeID=1</link><pubDate>Fri, 04 Jan 2019 12:51:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10188743-3301-4c56-8476-e740ec6ee64c</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Thanks for the quick reply. I was hoping to find some sample code for setting up the SPI and I2C interface. Also, I could not see any pin out info detailing what pins to use. Is that detailed there?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating a design from Raspberry pi Zero to nRF9160 DK - Need I2C and SPI interfaces</title><link>https://devzone.nordicsemi.com/thread/163947?ContentTypeID=1</link><pubDate>Fri, 04 Jan 2019 12:47:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:280abb25-4a12-48ae-881b-8bf77f794259</guid><dc:creator>Sani300</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can find&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF9160-DK/Download#infotabs"&gt;here&lt;/a&gt;&amp;nbsp;all information about sdk board of nRF9160. You will be able to build a custom board if you want, and find exemple to begin a new code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>