<?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 in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21954/spi-in-non-blocking-mode</link><description>Hello all, 
 I am actually implementing an SPI-master driver in non blocking mode, I write the following code, when I use a debeug led, the program enters well in the IRQ, but nothing happen in the MOSI when I visualize the signal using the logic analyzer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 May 2017 13:17:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21954/spi-in-non-blocking-mode" /><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86158?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 13:17:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bef7ba7-5f48-4a6f-b8d8-68f1ea8bc59b</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;ok, thanks you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86157?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 13:05:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f72e3be0-8676-40a8-98a7-0d750c64b5dd</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If an event handler was provided in the @ref nrf_drv_spi_init call, this function returns immediately and the handler is called when the transfer is done - This is non-blocking...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86156?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 13:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b2908ad-11dc-4deb-b829-565c8dfdbc0b</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;yes, I did, but as described in the documentation, nrf_drv_spi_transfer function perfoms transfer in blocking mode :&lt;/p&gt;
&lt;p&gt;/**&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;@brief Function for starting the SPI data transfer.&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;If an event handler was provided in the @ref nrf_drv_spi_init call, this function&lt;/li&gt;
&lt;li&gt;returns immediately and the handler is called when the transfer is done.&lt;/li&gt;
&lt;li&gt;Otherwise, the transfer is performed in blocking mode, which means that this function&lt;/li&gt;
&lt;li&gt;returns when the transfer is finished.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, nrf_drv_spi_xfer is non-blocking, that&amp;#39;s what is mentioned in the documentation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86152?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 12:52:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:869a49a0-94aa-436b-9aa5-ad54290920be</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You can use nrf_drv_spi_transfer(). Have you looked at the SPI Master example? It is non-blocking. Other than that I recommend checking the returned error codes of nrf_drv_spi_init() and nrf_drv_spi_transfer(). Are the NRF_SUCCESS (0x00000000)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86154?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 12:20:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e79cd00-5dde-4378-b8f5-5e987008bef2</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;I update, my code, i want just to be sure that writing data is made in non-blocking mode, it&amp;#39;s the case with this configuration?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86155?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 10:39:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:208c1c37-4c31-45ab-8f4d-70ee85560b33</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;done! IRQ means the handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86153?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 10:36:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5849775-7b78-40c8-a6f9-f3c60ff075ba</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;That is what you are actually doing? What do you mean? Maybe you can edit your question and include the code you are actually using? What IRQ are you talking about?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86160?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 10:35:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90abbce0-02de-4c73-8adf-3df90d18946c</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;That&amp;#39;s what I am actually doing, in non-blocking mode, I use the function &lt;strong&gt;nrf_drv_spi_xfer&lt;/strong&gt; , That&amp;#39;s right? If it is, should I call it inside or outside the IRQ ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86159?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 10:32:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fefe10b-aaac-421f-a9c0-0a6490ac7f2b</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Why are you using the 5 wire implementation? This is usually used for serialization. Maybe you can try using the SPI driver instead? &amp;quot;nrf_drv_spi.h&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86162?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 08:49:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dd21fbb-f3a6-47d2-83a1-1e9d70b16b44</guid><dc:creator>acha</dc:creator><description>&lt;p&gt;SDK 12.2.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI in non-blocking mode ?</title><link>https://devzone.nordicsemi.com/thread/86161?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 08:40:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dc335a2-8670-4f8b-9d60-0906d259f1dd</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Which SDK version are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>