<?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>Delay time bewteen two transfer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22408/delay-time-bewteen-two-transfer</link><description>Hi guys 
 I am using SPI example code in SDK11 (./nRF5_SDK_11.0.0_89a8197\examples\peripheral\spi) with nRF51 DK. 
 It works fine when send first data. 
 But it get in trouble when I send data(nrf_drv_spi_transfer) continuously. 
 I find it return</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 May 2017 14:40:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22408/delay-time-bewteen-two-transfer" /><item><title>RE: Delay time bewteen two transfer</title><link>https://devzone.nordicsemi.com/thread/88136?ContentTypeID=1</link><pubDate>Mon, 29 May 2017 14:40:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7bbd213-44e4-4f75-9154-19e1db30c4ed</guid><dc:creator>J&amp;#248;rn</dc:creator><description>&lt;p&gt;Hello pikachu&lt;/p&gt;
&lt;p&gt;The time it takes for a transfer depends on your transfer rate, in your case 125kb/s, and the amount of data you are transmitting. In the example it transmits the text &amp;quot;Nordic&amp;quot;, where each letter is represented with 8 bits. This should give a minimum transfer time of approximately 6*8/125000=384us.&lt;/p&gt;
&lt;p&gt;In the spi example you refer to you have the&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    while (!spi_xfer_done)
    {
        __WFE();
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the main loop. This flag is set in the spi_event_handler which is called upon an spi event, such as transfer complete. This way it waits until the previous transfer is complete before attempting a new one.
I recommend reading the SPI section of the nRF51 &lt;a href="http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.1.pdf"&gt;reference manual&lt;/a&gt;, for specifics on timing you can see the electrical specifications of the nRF51xxx product specification (the development kit uses &lt;a href="http://infocenter.nordicsemi.com/pdf/nRF51422_PS_v3.2.pdf"&gt;nRF514222&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Jørn Frøysa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>