<?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>Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45747/basic-spi-reads-and-writes</link><description>Hi, 
 I have a SPI peripheral connected to the nRF960 DK. In order to access this correctly, I need to be able to write a byte to a specific address first and then read back from specific addresses. 
 I can run the basic SPI example 
 https://github.com</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Jan 2021 11:00:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45747/basic-spi-reads-and-writes" /><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/289389?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 11:00:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e1fe664-7f01-4c2d-88dd-b4b643343343</guid><dc:creator>paul_tanner</dc:creator><description>&lt;p&gt;Many thanks Rod.&lt;/p&gt;
&lt;p&gt;Things have moved on a lot but this was very helpful in getting me unstuck.&lt;/p&gt;
&lt;p&gt;With a bit of help from Simon this is now sorted out.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/70515/spi-master-chip-select-in-overlay/290233#290233"&gt;devzone.nordicsemi.com/.../290233&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards, Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/289299?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 18:48:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a246d6f-8c76-41c0-931a-e00fc37184c5</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;I have not looked at this for a while so I can&amp;#39;t say 100% that this code is correct, but I have shared it anyway. Let me know if it works and if not, I will do a bit more digging my end.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi3 {
        status = &amp;quot;ok&amp;quot;;
	sck-pin = &amp;lt;10&amp;gt;;
	mosi-pin = &amp;lt;11&amp;gt;;
	miso-pin = &amp;lt;12&amp;gt;;
	ss-pin = &amp;lt;13&amp;gt;;
	spi-max-frequency = &amp;lt;4000000&amp;gt;;
	bme280@76 {
		compatible = &amp;quot;bosch,bme280&amp;quot;;
		reg = &amp;lt;0x76&amp;gt;;
		spi-max-frequency = &amp;lt;4000000&amp;gt;;
		label = &amp;quot;BME280&amp;quot;;
	};

};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_CONSOLE_SUBSYS=y
CONFIG_CONSOLE_GETCHAR=y
CONFIG_GPIO=y
CONFIG_STDOUT_CONSOLE=y

CONFIG_SERIAL=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_TEST_RANDOM_GENERATOR=y

CONFIG_SENSOR=y

CONFIG_NET_BUF_USER_DATA_SIZE=1

CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_HEAP_MEM_POOL_SIZE=1024
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_NEWLIB_LIBC=y

# SPI
CONFIG_SPI=y
CONFIG_SPI_3=y
CONFIG_SPI_3_NRF_SPIM=y
CONFIG_BME280=y
CONFIG_SPI_NRFX=y
CONFIG_SENSOR_LOG_LEVEL_WRN=y

CONFIG_TRUSTED_EXECUTION_NONSECURE=y


&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;device.h&amp;gt;
#include &amp;lt;sensor.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;

#undef DT_BOSCH_BME280_BUS_I2C
#define DT_BOSCH_BME280_BUS_SPI

void main(void)
{

int i;
	printf(&amp;quot;Boiler Guardian Test Code - BME280 over SPI \n&amp;quot;);
	printf(&amp;quot; \n&amp;quot;);

	struct device *dev = device_get_binding(&amp;quot;BME280&amp;quot;);

	printf(&amp;quot;dev %p name %s\n&amp;quot;, dev, dev-&amp;gt;config-&amp;gt;name);

	printf(&amp;quot;Boiler Guardian Test Code - BME280 - got binding  \n&amp;quot;);
	printf(&amp;quot; \n&amp;quot;);

	for(i = 1; i &amp;lt; 2; i++) {
		struct sensor_value temp, press, humidity;

		sensor_sample_fetch(dev);
		sensor_channel_get(dev, SENSOR_CHAN_AMBIENT_TEMP, &amp;amp;temp);
		sensor_channel_get(dev, SENSOR_CHAN_PRESS, &amp;amp;press);
		sensor_channel_get(dev, SENSOR_CHAN_HUMIDITY, &amp;amp;humidity);


		printf(&amp;quot;Environmental Temperature: %d.%d Degrees Cent. \n&amp;quot;, temp.val1, temp.val2);
		printf(&amp;quot;Environmental Pressure: %d.%02d Bar \n&amp;quot;, press.val1, press.val2);
		printf(&amp;quot;Environmental Humidity: %d.%02d per/cent \n&amp;quot;, humidity.val1, humidity.val2);


	}
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/289294?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 17:58:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0477c1aa-76ef-4996-a929-c81812d66ce9</guid><dc:creator>paul_tanner</dc:creator><description>&lt;p&gt;Hi Rod,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m travelling the same route on nrfConnect SDK 1.4&lt;/p&gt;
&lt;p&gt;Like you I got my I2C version working first and then wanted to use SPI.&lt;/p&gt;
&lt;p&gt;Any chance you could share your working sample?&lt;/p&gt;
&lt;p&gt;I have also posted this&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/70393/nrf9160-dk-spi-from-bme280-sensor-config-issue"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/70393/nrf9160-dk-spi-from-bme280-sensor-config-issue&lt;/a&gt;&amp;nbsp;- no answer on that so far.&lt;/p&gt;
&lt;p&gt;Thx.&lt;/p&gt;
&lt;p&gt;Regards, Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/189115?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 19:32:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5b50e9d-261f-4d69-9a36-6d68bb1e3e16</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I managed to get it working !&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188976?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 08:29:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f44499a-d2fe-4186-b446-c4a0b3f1a6c6</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Ok. Just to get back on the right&amp;nbsp;track again:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Are you able to run the &lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/spi"&gt;SPI example&lt;/a&gt; without BME280? What problems are you seeing?&lt;/li&gt;
&lt;li&gt;Is the hard fault issue still there?
&lt;ul&gt;
&lt;li&gt;In prj.conf, you must add:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_MAIN_STACK_SIZE=4096&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188756?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 08:54:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de64521d-68de-4f15-862a-32fe5d30acc2</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Yes, it solved the SPM issue, but Im now back to the problem of trying to get SPI to work!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188752?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 08:48:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b9b55d7-e3e5-47bd-8ca8-e3a95b7e4486</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Really glad to hear that it solved the issue!&lt;br /&gt;&lt;br /&gt;-Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188637?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 15:28:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0e6cd5e-d027-4ee6-8efd-97361cee5553</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I got this working but not 100% sure what actually did the trick. Based on this thread &amp;quot;&lt;/p&gt;
&lt;h1 class="name"&gt;nRF9160 at_client sample project&amp;quot;&lt;/h1&gt;
&lt;p&gt;i deleted my path and env variables.&lt;/p&gt;
&lt;p&gt;I then ran this again..&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;pip3 install -r zephyr/scripts/requirements.txt
pip3 install -r nrf/scripts/requirements.txt
pip3 install -r mcuboot/scripts/requirements.txt&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;as well as the update as above. Something did the trick and it burst into life.&lt;/p&gt;
&lt;p&gt;So, &amp;nbsp;I can no generate a merged.hex file and my code complies and runs. Unfortunately, my basic SPI reads and writes still dont work but at least I am now running on SPM&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188630?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 14:40:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:668286e7-7e70-490c-97db-aee49db72169</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Rod,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Really sorry for this being so difficult to fix, I have not seen similar issues.&amp;nbsp;&lt;/p&gt;
[quote user="RodWatt"]&lt;span&gt;2. I tried a&amp;nbsp;complete&amp;nbsp;new&amp;nbsp;&lt;/span&gt;install. But as you will see from below, I still get the &amp;quot;West already initialised&amp;quot; error[/quote]
&lt;p&gt;&amp;nbsp;You need to find a folder named &lt;strong&gt;.west&lt;/strong&gt;&amp;nbsp;on your computer. This folder is generated when initializing west. Try to find this folder and delete it to see if this has any impact.&lt;br /&gt;&lt;br /&gt;I am discussing the issue in my team and will get back to you asap.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188607?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 14:02:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97d07d2b-efa9-4f9c-bf44-e13c06bcd368</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi &amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ok, I have&amp;nbsp;&lt;/span&gt;gone though your steps as above.&lt;/p&gt;
&lt;p&gt;1. I deleted&amp;nbsp;&lt;span&gt;CmakeCache.txt and ran&amp;nbsp;zephyr-env.sh. When I tried to build, I get the same error as above.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. I tried a&amp;nbsp;complete&amp;nbsp;new&amp;nbsp;&lt;/span&gt;install. But as you will see from below, I still get the &amp;quot;West already initialised&amp;quot; error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Watts-MacBook-Pro:zephyrproject Watt$ mkdir NCS2
Watts-MacBook-Pro:zephyrproject Watt$ cd NCS2
Watts-MacBook-Pro:NCS2 Watt$ west init -m https://github.com/NordicPlayground/fw-nrfconnect-nrf --mr v0.4.0
West already initialized. Aborting.
Watts-MacBook-Pro:NCS2 Watt$ 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3. I don&amp;#39;t think its my code, to prove this I tried to build at_client. I get the same error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Watts-MacBook-Pro:nrf9160 Watt$ cd at_client/
Watts-MacBook-Pro:at_client Watt$ ls
CMakeLists.txt	prj.conf	sample.yaml	src
Watts-MacBook-Pro:at_client Watt$ mkdir build
Watts-MacBook-Pro:at_client Watt$ cd build/
Watts-MacBook-Pro:build Watt$ cmake -GNinja -DBOARD=nrf9160_pca10090ns ..
-- Using application from &amp;#39;/Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/at_client&amp;#39;
Zephyr version: 1.14.99
-- 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;) 
-- Selected BOARD nrf9160_pca10090ns
-- Found west: /usr/local/bin/west (found suitable version &amp;quot;0.5.8&amp;quot;, minimum required is &amp;quot;0.5.6&amp;quot;)
-- Cache files will be written to: /Users/Watt/Library/Caches/zephyr
-- Loading /Users/Watt/zephyrproject/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns.dts as base
-- Overlaying /Users/Watt/zephyrproject/ncs/zephyr/dts/common/common.dts
nrf9160_pca10090ns.dts.pre.tmp:258.19-264.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
Parsing Kconfig tree in /Users/Watt/zephyrproject/ncs/zephyr/Kconfig
Loading /Users/Watt/zephyrproject/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns_defconfig as base
Merging /Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/at_client/prj.conf
Configuration written to &amp;#39;/Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/at_client/build/zephyr/.config&amp;#39;
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /Users/Watt/gnuarmemb/bin/arm-none-eabi-gcc
-- Performing Test toolchain_is_ok
-- Performing Test toolchain_is_ok - Success
Including module: nrf in path: /Users/Watt/zephyrproject/ncs/nrf
-- Using application from &amp;#39;/Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/spm&amp;#39;
Zephyr version: 1.14.99
Changed board to secure nrf9160_pca10090 (NOT NS)
-- Loading /Users/Watt/zephyrproject/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090.dts as base
-- Overlaying /Users/Watt/zephyrproject/ncs/zephyr/dts/common/common.dts
-- Overlaying /Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/spm/nrf9160_pca10090.overlay
nrf9160_pca10090.dts.pre.tmp:120.18-126.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/uart@a000: duplicate unit-address (also used in node /soc/peripheral@50000000/i2c@a000)
  also defined at nrf9160_pca10090.dts.pre.tmp:512.8-514.3
nrf9160_pca10090.dts.pre.tmp:260.19-266.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@50000000/power@5000)
Parsing Kconfig tree in /Users/Watt/zephyrproject/ncs/zephyr/Kconfig
Loading /Users/Watt/zephyrproject/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090_defconfig as base
Merging /Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/spm/prj.conf
Configuration written to &amp;#39;/Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/at_client/build/spm/zephyr/.config&amp;#39;
Including module: nrf in path: /Users/Watt/zephyrproject/ncs/nrf
Including module: mcuboot in path: /Users/Watt/zephyrproject/ncs/mcuboot/zephyr
Including module: tinycbor in path: /Users/Watt/zephyrproject/ncs/modules/lib/tinycbor
Including module: nrfxlib in path: /Users/Watt/zephyrproject/ncs/nrfxlib
Including module: mcuboot in path: /Users/Watt/zephyrproject/ncs/mcuboot/zephyr
Including module: tinycbor in path: /Users/Watt/zephyrproject/ncs/modules/lib/tinycbor
Including module: nrfxlib in path: /Users/Watt/zephyrproject/ncs/nrfxlib
CMake Warning at /Users/Watt/zephyrproject/ncs/zephyr/CMakeLists.txt:1523 (message):
  

        ------------------------------------------------------------
        --- WARNING:  __ASSERT() statements are globally ENABLED ---
        --- The kernel will run more slowly and use more memory  ---
        ------------------------------------------------------------


-- Configuring done
CMake Error at /Users/Watt/zephyrproject/ncs/zephyr/cmake/extensions.cmake:423 (add_library):
  Cannot find source file:

    src/main.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx
Call Stack (most recent call first):
  /Users/Watt/zephyrproject/ncs/zephyr/cmake/app/boilerplate.cmake:554 (zephyr_library_named)
  ../spm/CMakeLists.txt:3 (include)


CMake Error at /Users/Watt/zephyrproject/ncs/zephyr/cmake/extensions.cmake:423 (add_library):
  No SOURCES given to target: spm_app
Call Stack (most recent call first):
  /Users/Watt/zephyrproject/ncs/zephyr/cmake/app/boilerplate.cmake:554 (zephyr_library_named)
  ../spm/CMakeLists.txt:3 (include)


-- Build files have been written to: /Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/at_client/build
Watts-MacBook-Pro:build Watt$ 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, I think i need to carry out a complete reinstall but it won&amp;#39;t seem to let me do this simply my creating a new NCS2 directory.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How can I do a clean install?&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188466?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 08:39:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9a7efe0-8901-4c34-9b9d-d8b376ab6196</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Rod,&lt;br /&gt;&lt;br /&gt;This is not making any sense. There is clearly an issue with your NCS install, but I am not fully able to reproduce the issue. There seems to be an issue with your path, from what I was able to reproduce.&lt;/p&gt;
&lt;p&gt;Please follow the next steps. They will be divided into 3 sections, each tackling in a different way.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;The first thing to try, if you were able to update the nrf repo and run west update:&lt;/p&gt;
&lt;p&gt;In your application:&amp;nbsp;&lt;strong&gt;/Users/Watt/Documents/Switch_That/Nordic_Semi_Code/SPI_Test&amp;nbsp;&lt;/strong&gt;do you have a CmakeCache.txt? (Not the one in the build folder)&lt;/p&gt;
&lt;p&gt;If so, please delete this and the build folder. Then to ensure the correct path, please run:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Run NCS/Zephyr/zephyr-env.sh &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then try to make a new build folder and run:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;cmake -GNinja -DBOARD=nrf9160_pca10090ns ..&lt;/pre&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;The second thing to try, as you are getting &amp;quot;West already initialized. Aborting.&amp;quot;:&lt;br /&gt;&lt;br /&gt;The clean install needs to be in a completely new folder. Please make a new folder with a completely new name e.g. NCS2, etc.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mkdir NCS2 &amp;amp;&amp;amp; cd NCS2
west init -m https://github.com/NordicPlayground/fw-nrfconnect-nrf --mr v0.4.0
west update&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;To ensure the correct path, run:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;NCS2/Zephyr/zephyr-env.sh&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then try to program &lt;strong&gt;NCS2\nrf\samples\nrf9160\at_client&lt;/strong&gt;, without changing the code to ensure everything works that way.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;The third thing is that you send me your project so that I can test it here.&lt;br /&gt;&lt;br /&gt;If anything is unclear, let me know.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188316?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 14:02:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeb20777-e036-4d40-bca0-227e038bb9f5</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tried the update as detailed above, all seemed to work fine but my code does not compile.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Watts-MacBook-Pro:build Watt$ cmake -GNinja -DBOARD=nrf9160_pca10090  ..
-- Using application from &amp;#39;/Users/Watt/Documents/Switch_That/Nordic_Semi_Code/SPI_Test&amp;#39;
Zephyr version: 1.14.99
CMake Warning at /Users/Watt/zephyrproject/ncs/zephyr/cmake/app/boilerplate.cmake:196 (message):
  The build directory must be cleaned pristinely when changing boards
Call Stack (most recent call first):
  CMakeLists.txt:3 (include)


-- Selected BOARD nrf9160_pca10090ns
-- Found west: /usr/local/bin/west (found suitable version &amp;quot;0.5.8&amp;quot;, minimum required is &amp;quot;0.5.6&amp;quot;)
-- Cache files will be written to: /Users/Watt/Library/Caches/zephyr
-- Loading /Users/Watt/zephyrproject/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns.dts as base
-- Overlaying /Users/Watt/zephyrproject/ncs/zephyr/dts/common/common.dts
-- Overlaying /Users/Watt/Documents/Switch_That/Nordic_Semi_Code/SPI_Test/nrf9160_pca10090ns.overlay
nrf9160_pca10090ns.dts.pre.tmp:258.19-264.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
Parsing Kconfig tree in /Users/Watt/zephyrproject/ncs/zephyr/Kconfig
Loading /Users/Watt/Documents/Switch_That/Nordic_Semi_Code/SPI_Test/build/zephyr/.config as base
Configuration written to &amp;#39;/Users/Watt/Documents/Switch_That/Nordic_Semi_Code/SPI_Test/build/zephyr/.config&amp;#39;
Including module: nrf in path: /Users/Watt/zephyrproject/ncs/nrf
-- Using application from &amp;#39;/Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/spm&amp;#39;
Zephyr version: 1.14.99
Changed board to secure nrf9160_pca10090 (NOT NS)
-- Loading /Users/Watt/zephyrproject/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090.dts as base
-- Overlaying /Users/Watt/zephyrproject/ncs/zephyr/dts/common/common.dts
-- Overlaying /Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/spm/nrf9160_pca10090.overlay
nrf9160_pca10090.dts.pre.tmp:120.18-126.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/uart@a000: duplicate unit-address (also used in node /soc/peripheral@50000000/i2c@a000)
  also defined at nrf9160_pca10090.dts.pre.tmp:512.8-514.3
nrf9160_pca10090.dts.pre.tmp:260.19-266.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@50000000/power@5000)
Parsing Kconfig tree in /Users/Watt/zephyrproject/ncs/zephyr/Kconfig
Loading /Users/Watt/Documents/Switch_That/Nordic_Semi_Code/SPI_Test/build/spm/zephyr/.config as base
Configuration written to &amp;#39;/Users/Watt/Documents/Switch_That/Nordic_Semi_Code/SPI_Test/build/spm/zephyr/.config&amp;#39;
Including module: nrf in path: /Users/Watt/zephyrproject/ncs/nrf
Including module: mcuboot in path: /Users/Watt/zephyrproject/ncs/mcuboot/zephyr
Including module: tinycbor in path: /Users/Watt/zephyrproject/ncs/modules/lib/tinycbor
Including module: nrfxlib in path: /Users/Watt/zephyrproject/ncs/nrfxlib
Including module: mcuboot in path: /Users/Watt/zephyrproject/ncs/mcuboot/zephyr
Including module: tinycbor in path: /Users/Watt/zephyrproject/ncs/modules/lib/tinycbor
Including module: nrfxlib in path: /Users/Watt/zephyrproject/ncs/nrfxlib
-- Configuring done
CMake Error at /Users/Watt/zephyrproject/ncs/zephyr/cmake/extensions.cmake:423 (add_library):
  Cannot find source file:

    src/main.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx
Call Stack (most recent call first):
  /Users/Watt/zephyrproject/ncs/zephyr/cmake/app/boilerplate.cmake:554 (zephyr_library_named)
  /Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/spm/CMakeLists.txt:3 (include)


CMake Error at /Users/Watt/zephyrproject/ncs/zephyr/cmake/extensions.cmake:423 (add_library):
  No SOURCES given to target: spm_app
Call Stack (most recent call first):
  /Users/Watt/zephyrproject/ncs/zephyr/cmake/app/boilerplate.cmake:554 (zephyr_library_named)
  /Users/Watt/zephyrproject/ncs/nrf/samples/nrf9160/spm/CMakeLists.txt:3 (include)


-- Build files have been written to: /Users/Watt/Documents/Switch_That/Nordic_Semi_Code/SPI_Test/build
Watts-MacBook-Pro:build Watt$ 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So then I tried a clean install....&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Watts-MacBook-Pro:ncs Watt$ west init -m https://github.com/NordicPlayground/fw-nrfconnect-nrf --mr v0.4.0
West already initialized. Aborting.

&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188224?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 11:41:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99c1d330-074c-4b07-83f0-e1e72e3c2b52</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="RodWatt"]Ok, I will try this later when I have some time,&amp;nbsp;although I think I may have done this&amp;nbsp;previously, I will go through the steps as you have detailed just to check[/quote]
&lt;p&gt;Yes, please do. I&amp;#39;m concerned that you do not have the latest version.&lt;/p&gt;
[quote user="RodWatt"]What&amp;#39;s the&amp;nbsp;easiest way of doing a&amp;nbsp;complete&amp;nbsp;clean install from a command line?[/quote]
&lt;p&gt;The easiest would be to do the following:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mkdir NCS &amp;amp;&amp;amp; cd NCS
west init -m https://github.com/NordicPlayground/fw-nrfconnect-nrf --mr v0.4.0
west update
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188161?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 09:08:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11ec35f8-7efd-458c-ba46-a9060a8165df</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi &lt;/span&gt;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ok, I will try this later when I have some time,&amp;nbsp;although I think I may have done this&amp;nbsp;previously, I will go through the steps as you have detailed just to check. If this doesn&amp;#39;t work, I will carry out &amp;nbsp;clean install. What&amp;#39;s the&amp;nbsp;easiest way of doing a&amp;nbsp;complete&amp;nbsp;clean install from a command line?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188135?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 08:08:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:029069ac-3017-41d7-86cd-d21dc4631a1a</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;OK, there is something missing here.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please do the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd ncs/nrf
git checkout master
git pull&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now verify that you have the correct tag:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;git tag

Outputs:
v0.1.0
v0.1.0-rc1
v0.3.0
v0.3.0-rc1
v0.3.0-rc2
v0.4.0
v0.4.0-rc1
v0.4.0-rc2&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;From the output, we see that tag v0.4.0 is available. We can now check out this tag:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;git checkout v0.4.0

Outputs:
Note: checking out &amp;#39;v0.4.0&amp;#39;.

You are in &amp;#39;detached HEAD&amp;#39; state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b &amp;lt;new-branch-name&amp;gt;

HEAD is now at f925102 manifest: Updated manifest to use D4 release tags.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then we can update using west:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west update&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This should fix the issues you have seen, building SPM and the sample project in one. Can&amp;#39;t remember if I wrote this before, but SES v4.16 does not support debugging a multi-image .hex file i.e. merged.hex. You have to program it manually. &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/47032/mqtt_simple-programmed-to-wrong-address-range-00008000----00020abb/185854#185854"&gt;The workaround is explained here&lt;/a&gt;. We are working on a fix.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188098?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 07:16:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94d7fffb-b7d0-41aa-9bc4-bf2cf78e5017</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;&amp;Oslash;yvind&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Yes, I saw that I thought that may be it but when I add this to my prj.conf I get an error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Watts-MacBook-Pro:build Watt$ cmake -GNinja -DBOARD=nrf9160_pca10090ns  ..
Zephyr version: 1.14.0
-- Selected BOARD nrf9160_pca10090ns
-- Found west: /usr/local/bin/west (found suitable version &amp;quot;0.5.7&amp;quot;, minimum required is &amp;quot;0.5.4&amp;quot;)
-- Loading /Users/Watt/zephyrproject/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns.dts as base
-- Overlaying /Users/Watt/zephyrproject/ncs/zephyr/dts/common/common.dts
-- Overlaying /Users/Watt/Documents/Switch_That/Nordic_Semi_Code/SPI_Test/nrf9160_pca10090ns.overlay
nrf9160_pca10090ns.dts.pre.tmp:252.19-258.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
Parsing Kconfig tree in /Users/Watt/zephyrproject/ncs/zephyr/Kconfig
Loading /Users/Watt/zephyrproject/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns_defconfig as base
Merging prj.conf

warning: LOG_DEFAULT_LEVEL (defined at subsys/logging/Kconfig:126) was assigned the value &amp;#39;4&amp;#39; but
got the value &amp;#39;&amp;#39;. You can check symbol information (including dependencies) in the &amp;#39;menuconfig&amp;#39;
interface (see the Application Development Primer section of the manual), or in the Kconfig
reference at http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LOG_DEFAULT_LEVEL.html
(which is updated regularly from the master branch). See the &amp;#39;Setting configuration values&amp;#39; section
of the Board Porting Guide as well.

prj.conf:2: warning: attempt to assign the value &amp;#39;y&amp;#39; to the undefined symbol SPM

warning: LOG_RUNTIME_FILTERING (defined at subsys/logging/Kconfig:120) has direct dependencies LOG with value n, but is currently being y-selected by the following symbols:
 - SHELL (defined at subsys/shell/Kconfig:13), with value y, direct dependencies &amp;quot;y&amp;quot; (value: y)

Error: Aborting due to non-whitelisted Kconfig warning &amp;#39;prj.conf:2: warning: attempt to assign the
value &amp;#39;y&amp;#39; to the undefined symbol SPM&amp;#39;. Note: If this warning doesn&amp;#39;t point to an actual problem,
you can add it to the whitelist at the top of
/Users/Watt/zephyrproject/ncs/zephyr/scripts/kconfig/kconfig.py.

CMake Error at /Users/Watt/zephyrproject/ncs/zephyr/cmake/kconfig.cmake:191 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /Users/Watt/zephyrproject/ncs/zephyr/cmake/app/boilerplate.cmake:397 (include)
  CMakeLists.txt:3 (include)


-- Configuring incomplete, errors occurred!
Watts-MacBook-Pro:build Watt$ 
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188095?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 07:08:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3f1b244-0fd4-4bde-8856-76dd045e6551</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Yes, it should look like this:&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-9254898cd0c54e9e8e0b4618595432c1/pastedimage1558422207367v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I think that you may have disabled &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/0.4.0/nrf/samples/nrf9160/spm/README.html?highlight=spm#automatic-building-of-spm"&gt;Automatic Building of SPM&lt;/a&gt;, please check you prj.conf that you have:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SPM=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Let me know if that helps.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/188033?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 17:46:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:045d7bef-3ccb-4ae5-b280-fe66b39fb306</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Ok, I have updated NCS as above and build my code using&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf9160_pca10090ns -d build
west flash -d build&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I was expecting this to create a merged hex file but is only seems to create the hex for my application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can confirm this by looking at the memory map.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2019_2D00_05_2D00_20-at-18.44.54.png" /&gt;What am I missing here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/187973?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 13:47:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c812e226-8169-4756-8213-e30ce6543e4b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Please read &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/0.4.0/nrf/gs_ins_windows.html#updating-the-repositories"&gt;&amp;quot;Updating the repositories&amp;quot;&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Your NCS folder should be similar to this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;ncs
 |___ .west
 |___ mcuboot
 |___ nrf
 |___ nrfxlib
 |___ zephyr&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Enter the following in command line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd ncs/nrf
git checkout v0.4.0
west update&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="RodWatt"]You say I need to set the zephyr environment first, is this necessary? This should be set already?[/quote]
&lt;p&gt;If you have added this path to your environmental variables, then ignore that message.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/187916?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 12:34:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d40b313-db43-4013-a5c4-f1abe8a3ac86</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sorry, I just want to check I&amp;nbsp;her&amp;nbsp;the latest tools. Im running&amp;nbsp;everyone from a command line&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So, to&amp;nbsp;update to&amp;nbsp;the latest version of NCS, is it just this....&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd ncs
git fetch ncs
west update &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You say I need to set the zephyr environment first, is this necessary? This should be set already?&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/187864?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 10:44:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faa9a720-6f66-45b5-b9e8-03e945f6dc1e</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Rod,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote][/quote]&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please can you clarify the steps to build my test program, with SPM merged and flash my board. Is it as simple as the code below?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Using the latest version of NCS, (v0.4.0), just remember to set zephyr environment first. After that, you should be able to run these commands and program your board. &lt;br /&gt;&lt;strong&gt;Edit&lt;/strong&gt;: See more information &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/0.4.0/nrf/gs_programming.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&amp;nbsp;&lt;br /&gt;Øyvind&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/187847?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 09:34:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4872583b-5054-4815-9897-36947093cfed</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Jan,&lt;/p&gt;
&lt;p&gt;Just wanted to nudge you on this again :-) I have now written a simple SPI program which I wish to test. When I run this, I am reading zeros back. However, I am still using &amp;quot;secure_boot&amp;quot; and have not yet migrated to &amp;quot;spm&amp;quot;. I am hoping that a move to SPM will help.&lt;/p&gt;
&lt;p&gt;Please can you clarify the steps to build my test program, with SPM merged and flash my board. Is it as simple as the code below?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf9160_pca10090ns -d build
west flash -d build&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Rod&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/184094?ContentTypeID=1</link><pubDate>Fri, 26 Apr 2019 13:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06d3e468-5d1e-4cd5-8b09-e164e667f5ca</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Jan,&lt;/p&gt;
&lt;p&gt;So just to clarify the update process, (sorry for this, I just want to check I&amp;#39;m not missing any steps.)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd ncs
git fetch ncs
west update &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am then building my application and flashing as follows&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cmake -GNinja -DBOARD=nrf9160_pca10090ns ..
ninja flash&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/184027?ContentTypeID=1</link><pubDate>Fri, 26 Apr 2019 10:28:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:922f5525-0daa-4364-9273-60090ae9629b</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;Hi Rod,&lt;/p&gt;
&lt;p&gt;If you are on the latest NCS master (&amp;quot;git fetch ncs&amp;quot; and checkout ncs/master or rebase your branch on top of it, then &amp;quot;west update&amp;quot;), SPM will automatically be included when you compile for nrf9160_pca10090ns. It will be compiled and merged with your application, so that when you run &amp;quot;west flash&amp;quot; to program the DK, both SPM and application are programmed together. You don&amp;#39;t need to compile and program secure_boot/SPM separately. By default SPI3 instance is then set as non-secure and you should be good to go.&lt;/p&gt;
&lt;p&gt;Let us know how it goes.&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: Basic SPI reads and writes</title><link>https://devzone.nordicsemi.com/thread/183848?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 13:45:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34a64142-a5e2-41ff-b09a-3c4f9e83449b</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Jan,&lt;/p&gt;
&lt;p&gt;Thanks for your reply. I will add the cs-gpios... code as above in my overlay file and see if that helps.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have updated my code base using the following&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd ncs/nrf
git checkout c1939d963fe2c18013ffb8de0bd8f6fc1d91724d
git checkout -b &amp;lt;choose_branch_name&amp;gt;
west update &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Previously,&amp;nbsp;&lt;span&gt;&amp;Oslash;yvind suggested I replace&amp;nbsp;the&amp;nbsp;secure boot code with the new SPM. You will see above that I have tried to&amp;nbsp;install and&amp;nbsp;build this but I keep&amp;nbsp;&lt;/span&gt;getting errors.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you have a look at the errors above please and let me know if you see what Im doing wrong&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>