<?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 SPI driver with nRF52840 DK and nRF Connect SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97161/using-spi-driver-with-nrf52840-dk-and-nrf-connect-sdk</link><description>I&amp;#39;m currently using nRF Connect SDK 1.9.1 and I would like to learn how to use the spi peripheral to talk between another processor acting as the master and my nRF52840 DK as a slave. I have not been able to really find a relevant example anywhere showing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Feb 2023 17:47:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97161/using-spi-driver-with-nrf52840-dk-and-nrf-connect-sdk" /><item><title>RE: Using SPI driver with nRF52840 DK and nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/412593?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 17:47:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63390138-891f-4cc7-826d-f84b5199e7ca</guid><dc:creator>zhsq6b</dc:creator><description>&lt;p&gt;Thanks, I&amp;#39;ll take a look at the example from github and see if I can replicate using my SDK version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using SPI driver with nRF52840 DK and nRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/412591?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 17:35:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bc373e5-4b86-44df-98d3-e8e60afc6147</guid><dc:creator>nordicator_prim3</dc:creator><description>&lt;p&gt;I&amp;#39;ve only had experience with the nordic acting as the master, but if you want an example of the SPI api then take a look at the sensor drivers for some SPI-based sensors like the ICM42605. Most of your communication will take place via the spi_transceive function or the higher-level functions based on spi_transceive from spi.h&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As far as the devicetree goes, just make sure the compatible property on your spi bus is nordic,nrf-spis&amp;nbsp; for the slave.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I found an example on github that has a single nrf chip acting as a slave and a master and talking to itself. It uses a newer version of the SDK (2.1.1) so the device tree will handle pins differently with the new pinctrl stuff so that will be different. The SPI driver is the same though, so everything not related to defining the pins should work the same. &lt;a href="https://github.com/too1/ncs-spi-master-slave-example"&gt;github.com/.../ncs-spi-master-slave-example&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>