<?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>Creating Two SPI instances for same slave</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12818/creating-two-spi-instances-for-same-slave</link><description>We are using NRF52832, SDK 11.0.0.2 alpha, S132 soft Device ,I need some clarifications on using SPI, 
 
 In nrf52832 SPI Master driver is it possible to create two SPI instances for the same slave device. 
 If Yes is it possible to configure the instance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Apr 2016 08:56:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12818/creating-two-spi-instances-for-same-slave" /><item><title>RE: Creating Two SPI instances for same slave</title><link>https://devzone.nordicsemi.com/thread/48715?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2016 08:56:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:175cb8a1-f79b-484e-9ea6-913109a32fa3</guid><dc:creator>Thangaraj</dc:creator><description>&lt;p&gt;Thanks a lot , Ole ... For your quick responses !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating Two SPI instances for same slave</title><link>https://devzone.nordicsemi.com/thread/48716?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2016 07:34:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f806cb5a-b503-4b34-95d3-c19db382214a</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;It will disconnect the pins (write 0xFFFFFFFF to the PSEL registers) of the SPI1 peripheral to allow other peripherals to use the pins without any trouble. See &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.0/spi.html?cp=1_2_0_46_1_3#register.PSEL.SCK"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating Two SPI instances for same slave</title><link>https://devzone.nordicsemi.com/thread/48713?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2016 05:59:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7c8727f-e29f-4313-a852-7ea0b8c12d87</guid><dc:creator>Thangaraj</dc:creator><description>&lt;p&gt;Can you please explain, what these lines will do ?&lt;/p&gt;
&lt;p&gt;NRF_SPI1-&amp;gt;PSEL.MISO = (SPI_PSEL_MISO_PSELMISO_Disconnected &amp;lt;&amp;lt; SPI_PSEL_MISO_PSELMISO_Pos);
NRF_SPI1-&amp;gt;PSEL.MOSI = (SPI_PSEL_MOSI_PSELMOSI_Disconnected &amp;lt;&amp;lt; SPI_PSEL_MOSI_PSELMOSI_Pos);
NRF_SPI1-&amp;gt;PSEL.SCK = (SPI_PSEL_SCK_PSELSCK_Disconnected &amp;lt;&amp;lt; SPI_PSEL_SCK_PSELSCK_Pos);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating Two SPI instances for same slave</title><link>https://devzone.nordicsemi.com/thread/48714?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2016 11:35:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d34f278b-ef98-4515-b9aa-741bff6a237a</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;If they are using the same pins it is no surprise i doesn&amp;#39;t work. When uninitializing the SPI instance it will free the pins used, such that the SPIM instance will be able to use them. Try to do this instead of uninit:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_SPI1-&amp;gt;PSEL.MISO = (SPI_PSEL_MISO_PSELMISO_Disconnected &amp;lt;&amp;lt; SPI_PSEL_MISO_PSELMISO_Pos);
NRF_SPI1-&amp;gt;PSEL.MOSI = (SPI_PSEL_MOSI_PSELMOSI_Disconnected &amp;lt;&amp;lt; SPI_PSEL_MOSI_PSELMOSI_Pos);
NRF_SPI1-&amp;gt;PSEL.SCK = (SPI_PSEL_SCK_PSELSCK_Disconnected &amp;lt;&amp;lt; SPI_PSEL_SCK_PSELSCK_Pos);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You will ofcourse have to set them up again (and disconnect the SPIM2 pins) before using SPI1 again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating Two SPI instances for same slave</title><link>https://devzone.nordicsemi.com/thread/48712?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2016 04:14:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64177c68-34b4-4331-bb15-c98dce79fc00</guid><dc:creator>Thangaraj</dc:creator><description>&lt;p&gt;Hi, I tried creating two SPI instances SPI1 and SPIM2  for the same slave device connected to pins 11(SCLK), 12(MOSI), 13(MISO), 14(CS), done a 4 byte transaction with slave using SPI1 and it was success followed by 3 seconds delay I tried to do DMA transaction with the same slave but it was not success.&lt;/p&gt;
&lt;p&gt;The same code when I start the DMA transaction after I uninit the SPI  instance created for CPU  transaction then it is fine.&lt;/p&gt;
&lt;p&gt;In the above scenario I&amp;#39;m not using the SPI slave (data transaction) at the same time by using both instances. what would be the reason for this behaviour?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating Two SPI instances for same slave</title><link>https://devzone.nordicsemi.com/thread/48711?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2016 12:34:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7476bb6f-cce0-4d2f-9d3f-59573e05188f</guid><dc:creator>Thangaraj</dc:creator><description>&lt;p&gt;Hi, Our intention is to do both DMA transaction and non-DMA transaction with one Slave device. We may use only one transaction at a time. In that case as you said, wont there be any issues ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creating Two SPI instances for same slave</title><link>https://devzone.nordicsemi.com/thread/48710?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2016 11:01:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7015199c-faca-46c2-b4c2-a0e151dd13cd</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Are you going to use the same pins (MISO, MOSI, SCK, CS) for both SPI instances? If so it will most likely not work unless you always makes sure that the two instances doesn&amp;#39;t use the pins at the same time. If you are not going to use the same pins, using two SPI instances for the same slave device is just fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>