<?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>Stream Data from SPIS to S130 SoftDevice on nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15534/stream-data-from-spis-to-s130-softdevice-on-nrf51822</link><description>Hi Nordic Community, 
 I am using the nRF51822 to receive a data stream from the SPIS module and transfer the data directly to a phone over BLE using the S130 softdevice. My data ranges from 2kB to 40kB so reading it into RAM and then transferring to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Aug 2016 16:41:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15534/stream-data-from-spis-to-s130-softdevice-on-nrf51822" /><item><title>RE: Stream Data from SPIS to S130 SoftDevice on nRF51822</title><link>https://devzone.nordicsemi.com/thread/59317?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2016 16:41:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1731949b-087c-4e73-b7d3-6351d055ffa6</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi jtrovato    Im thinking that you could use this single RDY line to indicate that it is safe for SPI slave to send data &lt;strong&gt;or&lt;/strong&gt; to indicate that the SPI slave (nrf51) has data to send. You could set this RDY line whenever there is event received from the softdevice of successfully transferred packet. Then the SPI master would transfer 20 bytes and then wait for the RDY line to be set again. In the case the SPI slave has data to send, it could also set the RDY line and the spi master transfers 20 bytes. The SPI master could set the first byte of the transaction to indicate the length of the packet (actually sending 21 bytes then), enabling the slave to transmit only valid data. If the slave has less than 20 bytes to send, it will send ORC character automatically to the master. There are also defined &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/ser_phy_spi_5_w_page.html?cp=6_0_0_3_2_2_1"&gt;5 wire&lt;/a&gt; and &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/ser_phy_spi_page.html?cp=6_0_0_3_2_2_0"&gt;6 wire&lt;/a&gt; SPI protocols which could be good to look at.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stream Data from SPIS to S130 SoftDevice on nRF51822</title><link>https://devzone.nordicsemi.com/thread/59318?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2016 15:08:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f8aa63c-ed03-422f-a59a-2c27c9b3e443</guid><dc:creator>jtrovato</dc:creator><description>&lt;p&gt;Hi Stefan, thanks for your response! I have a RDY line that is controlled by the SPI slave that indicates to the master when it is ready. The problem I am running into, is that in some situations, the slave also needs to tell the master that it has data to send, which is what the RDY is currently used for. I think I am going to need another line, so I have a RDY and REQ line for the spi slave both being ready and wanting to send data. I could implement one of these in software in the form of some type of acknowledge pack instead of RDY? With only 1 extra line on my SPI connection, what do you think the best way to do this is?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stream Data from SPIS to S130 SoftDevice on nRF51822</title><link>https://devzone.nordicsemi.com/thread/59316?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 16:38:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fa02ab9-4def-4def-b298-23b3874477e2</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Good questions.&lt;/p&gt;
&lt;p&gt;For latest BLE throughput tuning advice, &lt;a href="https://devzone.nordicsemi.com/question/84783/how-can-i-increase-throughput/?comment=86370#comment-86370"&gt;this thread&lt;/a&gt; could help. For SPIS throughput considerations, &lt;a href="https://devzone.nordicsemi.com/question/17689/spi-slave-with-heavy-interrupt-in-btle/?answer=17712#post-id-17712"&gt;this thread&lt;/a&gt; could give pointers.  &lt;a href="https://devzone.nordicsemi.com/question/23123/when-is-the-best-time-for-acquire-the-semaphore-spis-nrf51822/"&gt;This thread&lt;/a&gt; could also give some pointers on the SPIS side and also for the SPI master side.&lt;/p&gt;
&lt;p&gt;Optimally you would want to transfer 20 byte packets and configure the softdevice for 6 packets per connection event and set the BLE connection interval to minimum 7.5ms for maximum throughput, but this may be limited by the BLE peer side as mentioned on the first link above.&lt;/p&gt;
&lt;p&gt;Is all the data you mention in a single SPI transaction? Do you have some control over the SPI master side? Optimally, you would have control line from SPIS to SPI master, letting the slave indicate when it is safe for the master to send data. The master could send 120 bytes when it receives signal. The SPIS would get &amp;quot;transaction finished&amp;quot; event and send 6 packets of data over BLE, each with 20 bytes (fewer packets if the BLE peer device limits packets per connection event). Signal the SPI master again when the softdevice has received all the packets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>