<?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>SPI 2 Channels</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61984/spi-2-channels</link><description>Dear Sir . 
 
 I have on my custom board 2 spi , spi1 and spi3. 
 &amp;amp;spi3 { status = &amp;quot;okay&amp;quot;; compatible = &amp;quot;nordic,nrf-spim&amp;quot;; sck-pin = &amp;lt;31&amp;gt;; mosi-pin = &amp;lt;9&amp;gt;; miso-pin = &amp;lt;30&amp;gt;; cs-gpios = &amp;lt;&amp;amp;gpio0 26 1&amp;gt;,&amp;lt;&amp;amp;gpio0 15 1&amp;gt;; }; 
 &amp;amp;spi1 { status = &amp;quot;okay&amp;quot;; compatible</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Jun 2020 09:21:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61984/spi-2-channels" /><item><title>RE: SPI 2 Channels</title><link>https://devzone.nordicsemi.com/thread/253219?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 09:21:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5bcd43a-d0a6-496d-ac75-4fd9c4b019b6</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Have you figured this out&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/ephraim"&gt;ephraim&lt;/a&gt;? Did the solution from&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/chemax"&gt;CheMax&lt;/a&gt;&amp;nbsp;fix your problems?&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: SPI 2 Channels</title><link>https://devzone.nordicsemi.com/thread/252583?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2020 14:25:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce6a57e4-3093-4e41-9626-be2a5baa0b4b</guid><dc:creator>CheMax</dc:creator><description>&lt;p&gt;I believe that in this way you can disable&amp;nbsp; (I do not use HAL, so I propose a solution on registers):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_SPIM1-&amp;gt;ENABLE&amp;#160; &amp;#160;= SPIM_ENABLE_ENABLE_Disabled;

or:

NRF_SPIM3-&amp;gt;ENABLE&amp;#160; &amp;#160;= SPIM_ENABLE_ENABLE_Disabled;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but it&amp;rsquo;s in manual mode. as for the automatic depending on the interruption, I don&amp;rsquo;t know, maybe there is such a solution. In general, this should be considered)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;edit:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;look for a function &amp;quot;&lt;strong&gt;nrf_spim_disable(p_spim)&lt;/strong&gt;&amp;nbsp;&amp;quot; on the project&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI 2 Channels</title><link>https://devzone.nordicsemi.com/thread/252578?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2020 13:33:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:094cb914-26bf-4737-b1c4-fa66868d7b8b</guid><dc:creator>ephraim</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As I mentioned either I work with spi1 or spi3 only , one at the time , There is no &amp;quot;lock&amp;quot; of the cpu.&lt;/p&gt;
&lt;p&gt;Only when spi1 works after spi3 the systems stuck .&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there a way to enable / disable each SPI before working with the second spi ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI 2 Channels</title><link>https://devzone.nordicsemi.com/thread/252576?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2020 12:40:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:798288a5-96e3-4b97-bb58-6d1f35f9cfab</guid><dc:creator>CheMax</dc:creator><description>&lt;p&gt;Why not use the PPI to run an SPI that has only one slave? And cause an interruption already at the end of the exchange?&lt;/p&gt;
&lt;p&gt;Can you track what happens in the interrupt? Suspicion that the function of working with flash memory may be blocked. And by the way, this is not the best solution for starting slow work with memory from an interrupt.&lt;/p&gt;
&lt;p&gt;And yes, when you paste your code, it is better to use: Insert-&amp;gt; &amp;lt;/.Insert Code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;First, it visually separates code from text, which improves readability.
Secondly, the question will look more neat&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>