<?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>Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61270/using-nrf5340-pdk-with-zephyr-adxl372-sensor-sample-project</link><description>I&amp;#39;m new to the nRF5340 and zephyr and ncs, but I have gone through the tutorial series https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial 
 We&amp;#39;re developing a product that will use the SPIS peripheral</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Jun 2020 18:41:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61270/using-nrf5340-pdk-with-zephyr-adxl372-sensor-sample-project" /><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/254329?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2020 18:41:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:321de14c-be8d-4f38-8f65-895ac3dabbe3</guid><dc:creator>DBT</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;With this last piece of information, I was able to get&amp;nbsp;non-secure builds working with SPI pins on port 1.&lt;/p&gt;
&lt;p&gt;Now I&amp;#39;m able to get SPI working based on the adxl372 example code and the rallare example code, both secure and non-secure builds, using SPI pins on port 1.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/254268?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2020 13:25:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7237302b-c729-49fd-981f-b45bec9cf2c1</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I am really sorry for the late reply. I managed to make it work by modifying the files&amp;nbsp;&lt;em&gt;subsys/spm/spm.c&lt;/em&gt; and&amp;nbsp;&lt;em&gt;subsys/spm/Kconfig&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Could you try to apply the patch below to NCS v1.2.0 (nrf repo) and see if you can make it work. I was able to make it work with the P1 pins with these changes.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-adb185c3dbe843768786a0f52681022b/mypatch.diff"&gt;devzone.nordicsemi.com/.../mypatch.diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regarding referencing the P1 pins by using the index plus 32, you are correct, it seems like &lt;a href="https://github.com/nrfconnect/sdk-hal_nordic/blob/master/nrfx/hal/nrf_gpio.h#L523"&gt;this function&lt;/a&gt;&amp;nbsp;will find the correct port. I have not used this approach before, so I apologize for the confusion. I am learning every day&amp;nbsp;&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;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><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/252845?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 20:03:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c035712-d6aa-4264-b0b7-8cc1aa5d3627</guid><dc:creator>DBT</dc:creator><description>&lt;p&gt;Are you saying that the rallare example only supports P0 (Port 0) pins - not P1 pins?&lt;/p&gt;
&lt;p&gt;Or that the pin numbering for both P0 and P1 fit within 32 values?&lt;/p&gt;
&lt;p&gt;Per my prior post, these are the pins I want to use:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;CS: P1.05&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;SCK: P1.06&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;MISO: P1.07&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;MOSI: P1.08&lt;/p&gt;
&lt;p&gt;I would expect (based on prior experience with the nRF52840 and with the SPI example programs that are working for me - the ones that use a secure build) for P1 pins, you use the index plus 32.&lt;/p&gt;
&lt;p&gt;So P1.00 = 32, P1.01=33, P1.06 = 38 = 0x26, P1.07 = 39 = 0x27, P1.08 = 40 = 0x28&lt;/p&gt;
&lt;p&gt;What numbers should I use for the pins I want to use?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/252832?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 17:31:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b11f4704-27ae-40f6-9eb2-f681d3402a1c</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The reason it isn&amp;#39;t working with the SPI pins you&amp;#39;re using is that there are only 32 valid pin select option, specifically&amp;nbsp;&lt;span style="text-decoration:underline;"&gt;between 0 and 31&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;You&amp;#39;ve chosen the values 0x28, 0x27 and 0x26 which converts to the decimal values 40, 39, and 38. Check out the file&amp;nbsp;&lt;em&gt;ncs\nrf\samples\other\rallare_spi\build\zephyr\include\generated\devicetree.conf&amp;nbsp;&lt;/em&gt;after building the sample with those pins:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# SCK pin
DT_NORDIC_NRF_SPIM_40009000_SCK_PIN=38
DT_ALIAS_SPI_1_SCK_PIN=38
DT_NORDIC_NRF_SPIM_SPI_1_SCK_PIN=38
DT_INST_0_NORDIC_NRF_SPIM_SCK_PIN=38
# MOSI pin
DT_NORDIC_NRF_SPIM_40009000_MOSI_PIN=40
DT_ALIAS_SPI_1_MOSI_PIN=40
DT_NORDIC_NRF_SPIM_SPI_1_MOSI_PIN=40
DT_INST_0_NORDIC_NRF_SPIM_MOSI_PIN=40
# MISO pin
DT_NORDIC_NRF_SPIM_40009000_MISO_PIN=39
DT_ALIAS_SPI_1_MISO_PIN=39
DT_NORDIC_NRF_SPIM_SPI_1_MISO_PIN=39
DT_INST_0_NORDIC_NRF_SPIM_MISO_PIN=39&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I was too quick to answer the question you asked earlier: &lt;em&gt;&amp;quot;I don&amp;#39;t understand why it was necessary to change the pins.&amp;nbsp; I had planned to use:&amp;quot;.&lt;/em&gt; The reply provided above answers this question.&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><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/252494?ContentTypeID=1</link><pubDate>Fri, 29 May 2020 20:14:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ce8849a-908d-4d1c-8f6f-8f7f9dc43f58</guid><dc:creator>DBT</dc:creator><description>&lt;p&gt;OK if I download the&amp;nbsp;&lt;span style="font-weight:400;"&gt;rallare_spi.zip file from the link you provided, it seems to work as-is with a non-secure build.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;If I try to change the SPI pins to the ones I want to use, it stops working.&amp;nbsp; Do you have any insight?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf5340_dk_nrf5340_cpuappns.overlay


BEFORE 

&amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;ok&amp;quot;;
	mosi-pin = &amp;lt;4&amp;gt;;
	miso-pin = &amp;lt;5&amp;gt;;
	sck-pin = &amp;lt;6&amp;gt;;
};


&amp;amp;spi2 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;i2c1 {
    status = &amp;quot;disabled&amp;quot;;
};


AFTER

&amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;ok&amp;quot;;
	mosi-pin = &amp;lt;0x28&amp;gt;;
	miso-pin = &amp;lt;0x27&amp;gt;;
	sck-pin = &amp;lt;0x26&amp;gt;;
};


&amp;amp;spi2 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;i2c1 {
    status = &amp;quot;disabled&amp;quot;;
};
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/252055?ContentTypeID=1</link><pubDate>Wed, 27 May 2020 22:28:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a803b39-0544-4286-b0f9-56fdd56a2b90</guid><dc:creator>Simon</dc:creator><description>[quote user="DTurnbow"]I don&amp;#39;t understand why it was necessary to change the pins.&amp;nbsp; I had planned to use:[/quote]
&lt;p&gt;No, that shouldn&amp;#39;t be necessary. Just forget my comment about that.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you seen &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/58966/is-there-any-sample-for-spi-based-on-nrf5340"&gt;this ticket&lt;/a&gt;, where a colleague has provided a working modified version of rallare SPI using SPI_1 and the non-secure version of the board (&lt;span&gt;nrf5340_dk_nrf5340_cpuapp&lt;/span&gt;&lt;strong&gt;ns&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;It seems like you have to disable i2c1 in the overlay file.&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><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/251783?ContentTypeID=1</link><pubDate>Tue, 26 May 2020 18:41:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a1083ea-9a56-41fd-a2dd-0bbd30040ed1</guid><dc:creator>DBT</dc:creator><description>&lt;p&gt;With the changes you suggested, I was able to get the&amp;nbsp;SPI sample from Rallare SPI sample to work as you described.&lt;/p&gt;
&lt;p&gt;It seems like your step &amp;quot;Removed CONFIG_TRUSTED_EXECUTION_NONSECURE=y from prj.conf&amp;quot; was necessary to get the secure build to build successfully.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand why it was necessary to change the pins.&amp;nbsp; I had planned to use:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;CS: P1.05&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;SCK: P1.06&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;MISO: P1.07&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;MOSI: P1.08&lt;/p&gt;
&lt;p&gt;Which you changed to:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;CS: P1.05&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;SCK: P0.26&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;MISO: P0.27&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;MOSI: P0.30&lt;/p&gt;
&lt;p&gt;But why was this change necessary?&lt;/p&gt;
&lt;p&gt;The modified adxl372 example (secure build) I mentioned above uses the original pins successfully.&lt;/p&gt;
&lt;p&gt;By the way, the CS pin did not go low during transmissions even after implementing your changes, so is there some problem with the sample code that makes port 1 pins not work?&amp;nbsp; (You have to use port 0?)&lt;/p&gt;
&lt;p&gt;I also don&amp;#39;t understand why the non-secure builds for the SPI&amp;nbsp;sample or the&amp;nbsp;adxl372 sample don&amp;#39;t produce any SPI activity on the SPI port.&lt;/p&gt;
&lt;p&gt;Can you provide any insight?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/251357?ContentTypeID=1</link><pubDate>Sun, 24 May 2020 15:09:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74b8e044-056b-48ed-a45a-aec5ce04d5ef</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I managed to get&amp;nbsp;your modified SPI sample from&amp;nbsp;&lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/spi"&gt;Rallare SPI sample&lt;/a&gt;&amp;nbsp;to work. I did the following to make it work:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Started with the SPI sample you uploaded in your latest reply&lt;/li&gt;
&lt;li&gt;Removed&amp;nbsp;CONFIG_TRUSTED_EXECUTION_NONSECURE=y from prj.conf&lt;/li&gt;
&lt;li&gt;Changed the pin values in&amp;nbsp;nrf5340_dk_nrf5340_cpuapp.overlay from hexadecimal format into decimal format:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi1 {
	status = &amp;quot;okay&amp;quot;;
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	sck-pin = &amp;lt;26&amp;gt;; //sck-pin = &amp;lt;0x26&amp;gt;;
	//Had to use pin 30 since pin 28 was not accessible on my nRF53DK for some reason
	mosi-pin = &amp;lt;30&amp;gt;; //mosi-pin = &amp;lt;0x28&amp;gt;;
	miso-pin = &amp;lt;27&amp;gt;; //miso-pin = &amp;lt;0x27&amp;gt;;
	cs-gpios = &amp;lt;&amp;amp;gpio1 5 0&amp;gt;;
	clock-frequency = &amp;lt;4000000&amp;gt;;
};
&amp;amp;spi2 {
	status = &amp;quot;disabled&amp;quot;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Then I connected P0.27 with P0.30 on the nRF53 DK&lt;/li&gt;
&lt;li&gt;Built the sample, turned on the nRF53 DK, and flashed it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If it works, you should see the following log:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.1.99-ncs1  ***
SPIM Example
TX sent: 0
RX recv: 0
TX sent: 1
RX recv: 1
TX sent: 2
RX recv: 2
TX sent: 3
RX recv: 3
TX sent: 4
RX recv: 4
TX sent: 5
RX recv: 5
TX sent: 6
RX recv: 6
TX sent: 7
RX recv: 7
TX sent: 8
RX recv: 8
TX sent: 9
RX recv: 9
TX sent: a
RX recv: a
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Here is the working sample:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-adb185c3dbe843768786a0f52681022b/spi.zip"&gt;devzone.nordicsemi.com/.../spi.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/250832?ContentTypeID=1</link><pubDate>Tue, 19 May 2020 22:06:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9066272-b565-463c-bb8e-f8e6139a8fe0</guid><dc:creator>DBT</dc:creator><description>&lt;p&gt;According to the errata, SPI_3 does not work on nRF5340, so I tried the other option.&lt;/p&gt;
&lt;p&gt;I added these lines&amp;nbsp;to nrf/subsys/spm/Kconfig&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;config SPM_NRF_P1_NS&lt;br /&gt; bool &amp;quot;GPIO is Non-Secure&amp;quot;&lt;br /&gt; default y&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;config SPM_NRF_SPIM1_NS&lt;br /&gt; bool &amp;quot;SPIM1 is Non-Secure&amp;quot;&lt;br /&gt; default y&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I added these lines&amp;nbsp;to&lt;/span&gt; nrf/subsys/spm/spm.c&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;#ifdef NRF_P1&lt;br /&gt; PERIPH(&amp;quot;NRF_P1&amp;quot;, NRF_P1, CONFIG_SPM_NRF_P1_NS),&lt;br /&gt;#endif&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;#ifdef NRF_SPIM1&lt;br /&gt; PERIPH(&amp;quot;NRF_SPIM1&amp;quot;, NRF_SPIM1, CONFIG_SPM_NRF_SPIM1_NS),&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;But I still don&amp;#39;t get any SPI activity on the non-secure build.&lt;/p&gt;
&lt;p&gt;Did I miss something?&lt;/p&gt;
&lt;p&gt;I also tried the other SPI example you provided, but it looks like the formatting of the nRF Connect SDK has changed a lot since that example was written.&amp;nbsp; I tried fixing each issue as I got warning messages, but I wasn&amp;#39;t able to get the secure build to build successfully, and the non-secure build does not produce any SPI activity.&lt;/p&gt;
&lt;p&gt;Here is the current state of that sample project (with my edits)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/spi_2D00_20200519.zip"&gt;devzone.nordicsemi.com/.../spi_2D00_20200519.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/250733?ContentTypeID=1</link><pubDate>Tue, 19 May 2020 13:01:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86875800-3bf6-463e-a166-3533fdf1acd5</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;If you are trying out just the SPI, I would rather recommend you checking out a simple SPI sample --&amp;gt;&amp;nbsp;&lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/spi"&gt;https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/spi&lt;/a&gt;&amp;nbsp;that shows how you can implement and use it.&lt;/p&gt;
&lt;p&gt;Just change the .overlay file to suit your nrf5340 and your chosen pins.&lt;br /&gt;&lt;br /&gt;The reason it&amp;#39;s working when building the application in the Secure area, is because then you have the SPI 1 available to be used. If you look at the &amp;quot;Secure Partition Manager&amp;quot; when building the application for the non-secure area you see that you only have enabled SPI 3 to be used in the non-secure area:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-adb185c3dbe843768786a0f52681022b/pastedimage1589892790059v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Not all peripherals have been set to new available by default in the non-secure area.&lt;/p&gt;
&lt;p&gt;However, there is a Pull request to fix that:&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/1896"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/1896&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So either change the device tree file (.overlay file) + &lt;em&gt;prj.conf (configuration file)&lt;/em&gt;&amp;nbsp;file to use SPI 3 or&lt;/p&gt;
&lt;p&gt;change the nrf/subsys/spm files &amp;quot;Kconfig&amp;quot; and &amp;quot;spm.c&amp;quot; with these additional lines so you get access to the SPI_1 in the non-secure area.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/1896/files#diff-4098c32be5d8477048a5e432e1d5066cR211" rel="noopener noreferrer" target="_blank"&gt;Kconfig&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/1896/files#diff-1fc2cb7b73ad651451ae701d1291c686R342" rel="noopener noreferrer" target="_blank"&gt;spm.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Br,&lt;/p&gt;
&lt;p&gt;Martin L.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/250516?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 16:09:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:894a291e-4081-4a35-947b-54b5f969b4bb</guid><dc:creator>DBT</dc:creator><description>&lt;p&gt;Q1:&lt;/p&gt;
&lt;p&gt;I understand that if I want to fully use the adxl372 example program (get accelerometer readings, etc.) I would need to connect an adxl372.&lt;/p&gt;
&lt;p&gt;But I&amp;#39;m just trying to get the SPI port operating.&lt;/p&gt;
&lt;p&gt;Once I get the SPI port operating, I&amp;#39;m going to change the example code to not use the adxl372 but to accomodate what we&amp;#39;re doing on our board.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m looking at the SPI signals (cs, sck, mosi, miso) with an oscilloscope and looking for data to be sent over the SPI bus.&lt;/p&gt;
&lt;p&gt;I understand that without an adxl372 connected, device_get_binding() will fail, but it should attempt to read a few registers over the SPI bus before concluding that the adxl372 is not connected.&amp;nbsp; I should see those register reads on the oscilloscope.&lt;/p&gt;
&lt;p&gt;When I build and run a non-secure application&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/723x472/__key/communityserver-discussions-components-files/4/adxl372_2D00_nonsecure.png" /&gt;&lt;/p&gt;
&lt;p&gt;This is what I see on the console:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/adxl_2D00_nonsecure.txt"&gt;devzone.nordicsemi.com/.../adxl_2D00_nonsecure.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using the debugger in SES, I can see that the code execution is getting to&amp;nbsp;adxl372_init() and running&amp;nbsp;adxl372_probe() and&amp;nbsp;adxl372_reg_read().&amp;nbsp; It appears to get stuck in&amp;nbsp;z_impl_spi_transceive().&lt;/p&gt;
&lt;p&gt;On the oscilloscope, I&amp;#39;ve tried triggering on CS going low, SCK going low, and MOSI going low.&amp;nbsp; None of these signals are changing state while running the non-secure app.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;HOWEVER, if I build and run the app as secure:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/723x401/__key/communityserver-discussions-components-files/4/adxl372_2D00_secure.png" /&gt;&lt;/p&gt;
&lt;p&gt;This is what I see on the console:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/adxl372_2D00_secure.txt"&gt;devzone.nordicsemi.com/.../adxl372_2D00_secure.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and the oscilloscope triggers.&amp;nbsp; I see the nRF5340 send 0x01 0xFF 0x05 0xFF over the SPI bus (on MOSI).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So I&amp;#39;m trying to understand why the secure app is actually sending SPI bytes but the non-secure app is not.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not preventing me from moving on, but since I&amp;#39;m new to the nRF Connect SDK and zephyr and the nRF5340 I&amp;#39;m trying to better understand the issues with using them.&lt;/p&gt;
&lt;p&gt;By the way, I&amp;#39;ve changed the overlay files to separate the CS and interrupt pins.&amp;nbsp; This doesn&amp;#39;t seem to affect the behavior described above.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s my updated project&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/adxl372_2D00_20200518.zip"&gt;devzone.nordicsemi.com/.../adxl372_2D00_20200518.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/250470?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 13:52:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a16da4c5-0f65-45b8-89ba-32b660334be7</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Douglas,&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-adb185c3dbe843768786a0f52681022b/pastedimage1589809736759v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Looking at the pins you have selected, 26,27 and 28 should be OK, but you have selected the &lt;span style="text-decoration:underline;"&gt;same pin (p1.05) for both CS and int1.&lt;/span&gt;&lt;em&gt;&amp;nbsp;( They are not the same )&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;One other thing you should notice is that to use the adxl372 driver you need to connect to a adxl372. Since it is a init function that runs in the beginning and check if the device is connected. (if not the &amp;quot;device_get_binding()&amp;quot; will fail)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;When you build a regular application, you build it for the non-secure area as described in the document &amp;quot;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf9160.html#application" rel="noopener noreferrer" target="_blank"&gt;working with nrf9160&amp;quot;&lt;/a&gt;.&lt;br /&gt;But you also build &amp;quot;Secure Partition Manager&amp;quot; at the same time, which is why both the &amp;quot;menuconfig&amp;quot; for your application and &amp;quot;spm_menuconfig&amp;quot; shows when you try to configure something building an application in the&amp;nbsp;&amp;quot;non-secure&amp;quot; area.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/249488?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 12:56:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f4fecf9-064c-4fd4-a7df-df17c5f7bf6d</guid><dc:creator>DBT</dc:creator><description>&lt;p&gt;Here&amp;#39;s my project zipped up&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/adxl372.zip"&gt;devzone.nordicsemi.com/.../adxl372.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nRF5340-PDK with zephyr adxl372 sensor sample project</title><link>https://devzone.nordicsemi.com/thread/249311?ContentTypeID=1</link><pubDate>Mon, 11 May 2020 20:53:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:634d009d-1c88-4842-821b-05f997ea0686</guid><dc:creator>DBT</dc:creator><description>&lt;p&gt;Since SPIM2&amp;nbsp;does not work on nRF5340 yet I updated&amp;nbsp;&lt;span&gt;prj.conf as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_STDOUT_CONSOLE=y
CONFIG_LOG=y
CONFIG_SPI=y
CONFIG_SPI_2=n
CONFIG_SPI_1=y
CONFIG_SPI_1_OP_MODES=1
CONFIG_SPI_1_NRF_SPIM=y
CONFIG_SPI_1_NRF_ORC=0xff
CONFIG_SENSOR=y
CONFIG_ADXL372=y
CONFIG_ADXL372_SPI=y
CONFIG_SENSOR_LOG_LEVEL_WRN=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And I added&amp;nbsp;&lt;/span&gt;nrf5340_dk_nrf5340_cpuapp.overlay and nrf5340_dk_nrf5340_cpuappns.overlay&amp;nbsp;both as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi1 {
	status = &amp;quot;okay&amp;quot;;
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	sck-pin = &amp;lt; 0x26 &amp;gt;;
	mosi-pin = &amp;lt; 0x28 &amp;gt;;
	miso-pin = &amp;lt; 0x27 &amp;gt;;
	cs-gpios = &amp;lt;&amp;amp;gpio1 5 0&amp;gt;;

	adxl372@0 {
		compatible = &amp;quot;adi,adxl372&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
		spi-max-frequency = &amp;lt;1000000&amp;gt;;
		label = &amp;quot;ADXL372&amp;quot;;
		int1-gpios = &amp;lt;&amp;amp;gpio1 5 0&amp;gt;;
	};
};
&amp;amp;spi2 {
	status = &amp;quot;disabled&amp;quot;;
};
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>