<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF9160 SPI slave Example code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50677/nrf9160-spi-slave-example-code</link><description>Can anyone please provide nRF9160 SPI slave Example code? 
 
 Thanks, 
 -Ankit</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Dec 2019 11:41:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50677/nrf9160-spi-slave-example-code" /><item><title>RE: nRF9160 SPI slave Example code</title><link>https://devzone.nordicsemi.com/thread/223297?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 11:41:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b10d6f71-0c5a-497f-bd0a-38b2180e1e53</guid><dc:creator>nRF9160</dc:creator><description>&lt;p&gt;If you are going to implement SPI Slave, Below setting will work:&lt;/p&gt;
&lt;p&gt;in&amp;nbsp;nrf9160_pca10090ns.overlay file:&lt;/p&gt;
&lt;p&gt;&amp;amp;spi3 {&lt;br /&gt; compatible = &amp;quot;nordic,nrf-spis&amp;quot;;&lt;br /&gt; status = &amp;quot;okay&amp;quot;;&lt;br /&gt; sck-pin = &amp;lt;13&amp;gt;;&lt;br /&gt; mosi-pin = &amp;lt;11&amp;gt;;&lt;br /&gt; miso-pin = &amp;lt;12&amp;gt;;&lt;br /&gt; csn-pin = &amp;lt;10&amp;gt;;&lt;br /&gt; def-char = &amp;lt;0x00&amp;gt;;&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;in prj.conf file:&lt;/p&gt;
&lt;p&gt;# SPI&lt;br /&gt;#CONFIG_SPI=y&lt;br /&gt;#CONFIG_SPI_SLAVE=y&lt;br /&gt;#CONFIG_SPI_3_NRF_SPIS=y&lt;br /&gt;# 2 = slave only&lt;br /&gt;#CONFIG_SPI_3_OP_MODES=2&lt;br /&gt;#CONFIG_SPI_ASYNC=y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note: when proj.config file is changed, reopen project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 SPI slave Example code</title><link>https://devzone.nordicsemi.com/thread/223180?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 02:02:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b321a2a-63d6-4374-bf73-703fa0f4cd48</guid><dc:creator>duxinglang_1</dc:creator><description>&lt;p&gt;I have defined the pin mapping of SPI in the overlay file, but when I load my application in SES, it has such an error. What is the cause of this?&lt;/p&gt;
&lt;p&gt;the overlay file is like this:&lt;/p&gt;
&lt;p&gt;&amp;amp;spi3 {&lt;br /&gt;status = &amp;quot;okay&amp;quot;;&lt;br /&gt;sck-pin = &amp;lt;15&amp;gt;;&lt;br /&gt;mosi-pin = &amp;lt;14&amp;gt;;&lt;br /&gt;miso-pin = &amp;lt;13&amp;gt;;&lt;br /&gt;spi-max-frequency = &amp;lt;4000000&amp;gt;;&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;and the SES report this error:&lt;/p&gt;
&lt;p&gt;devicetree error:&amp;#39;spi-max-frequency&amp;#39; appears in /soc/peripheral@40000000/spi@b000 in nrf9160_pca10090ns.dts.pre.tmp,but is not declared in &amp;#39;properties:&amp;#39; in D:/software/nrf9160/ncs/zephyr/dts/bindings\spi\nordic,nrf-spim.yaml&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 SPI slave Example code</title><link>https://devzone.nordicsemi.com/thread/202573?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2019 10:45:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8110d53-01b9-4b18-a690-00f77e6b33b4</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;If you mean that there is no sample for SPIS, then;&amp;nbsp;you are right, there&amp;#39;s no sample specifically for SPIS.&lt;/p&gt;
&lt;p&gt;The drivers and port files are present in zephyr:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-zephyr/blob/master/drivers/spi/spi_nrfx_spis.c"&gt;https://github.com/NordicPlayground/fw-nrfconnect-zephyr/blob/master/drivers/spi/spi_nrfx_spis.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To enable the module, here with enabling SPIS 3, you can add this to your prj.conf file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# SPI
CONFIG_SPI=y
CONFIG_SPI_SLAVE=y
CONFIG_SPI_3_NRF_SPIS=y
# 2 = slave only
CONFIG_SPI_3_OP_MODES=2&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note: add &amp;quot;CONFIG_SPI_ASYNC=y&amp;quot; for asynchronous SPIS operation.&lt;/p&gt;
&lt;p&gt;And you&amp;#39;ll also need to set which GPIOs to use and other settings, typically in your project_folder/nrf9160_pca10090ns.overlay (Note, new overlay settings!):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi3 {
	compatible = &amp;quot;nordic,nrf-spis&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	sck-pin = &amp;lt;10&amp;gt;;
	mosi-pin = &amp;lt;11&amp;gt;;
	miso-pin = &amp;lt;12&amp;gt;;
	csn-pin = &amp;lt;13&amp;gt;;
	def-char = &amp;lt;0x00&amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 SPI slave Example code</title><link>https://devzone.nordicsemi.com/thread/202569?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2019 10:32:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adfc42e2-e3ea-4d5c-b96d-777abcab6a95</guid><dc:creator>nRF9160</dc:creator><description>&lt;p&gt;Sample code link you have given is for SPI master. i need SPI slave code&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 SPI slave Example code</title><link>https://devzone.nordicsemi.com/thread/202554?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2019 09:24:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cf6062b-8cda-47ee-bbac-f8a40f8ce429</guid><dc:creator>Hoang</dc:creator><description>&lt;p&gt;&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;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>