<?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>Send data received on ble nus to SPI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50138/send-data-received-on-ble-nus-to-spi</link><description>I merged ble_app_uart with spi peripheral example, normal working like bluetooth connectivity, spi sending and receiving is working fine, but i want to transmit data received on ble_nus to SPI, instead of uart. i tried this line just after err_code =</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Jul 2019 11:46:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50138/send-data-received-on-ble-nus-to-spi" /><item><title>RE: Send data received on ble nus to SPI</title><link>https://devzone.nordicsemi.com/thread/200502?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:46:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d22ead02-fc66-4a53-89fa-bcb1a468d7e9</guid><dc:creator>Satyamkr80</dc:creator><description>&lt;p&gt;yes, i ressolved this issue by increasing the receving packet size m_rx_buf&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;#define TEST_STRING &amp;quot;Nordic&amp;quot;&lt;br /&gt;static uint8_t m_tx_buf[] = TEST_STRING; /**&amp;lt; TX buffer. */&lt;br /&gt;static uint8_t m_rx_buf[sizeof(TEST_STRING) + 1]; /**&amp;lt; RX buffer. */&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send data received on ble nus to SPI</title><link>https://devzone.nordicsemi.com/thread/200499?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:41:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a14b20a1-7230-48a6-ba14-9275edf810fe</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;so has that also fixed the problem with&amp;nbsp;&lt;span&gt;receiving only 6 bytes?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send data received on ble nus to SPI</title><link>https://devzone.nordicsemi.com/thread/200496?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:38:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8957d017-8b5f-41e5-a335-a1b07c7cdd5c</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;again, have you got this working&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;strong&gt;without&lt;/strong&gt;&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;BLE ?&lt;/p&gt;
&lt;p&gt;Have you used an oscilloscope to see what&amp;#39;s happening on the wires?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send data received on ble nus to SPI</title><link>https://devzone.nordicsemi.com/thread/200495?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:38:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b31ded18-264b-4cc1-bc08-b1218e0e5553</guid><dc:creator>Satyamkr80</dc:creator><description>&lt;p&gt;hi awneil,&lt;/p&gt;
&lt;p&gt;Actually problem was with variable definition inside&amp;nbsp;nrf_drv_spi_transfer, now its working fine after using this line&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nrf_drv_spi_transfer(&amp;amp;spi, p_evt-&amp;gt;params.rx_data.p_data, p_evt-&amp;gt;params.rx_data.length, NULL, 0);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send data received on ble nus to SPI</title><link>https://devzone.nordicsemi.com/thread/200492?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:31:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:283b95d7-09db-4524-91b4-2bc4ebf4ba38</guid><dc:creator>Satyamkr80</dc:creator><description>&lt;p&gt;hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;it worked ! Thanks&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But i am receiving only 6 bytes on spis side, note more than that?&lt;/p&gt;
&lt;p&gt;for example, if i am sending &amp;quot;abcdefg&amp;quot; i am receiving only &amp;quot;abcdef&amp;quot; at slave board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send data received on ble nus to SPI</title><link>https://devzone.nordicsemi.com/thread/200489?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:24:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af058fa2-31da-4e20-9d9e-0b70b9f18f8a</guid><dc:creator>awneil</dc:creator><description>[quote userid="79478" url="~/f/nordic-q-a/50138/send-data-received-on-ble-nus-to-spi"] i am not able to receive data on spi[/quote]
&lt;p&gt;Are you certain that the data is actually being transmitted ?&lt;/p&gt;
&lt;p&gt;Have you used an oscilloscope to see what&amp;#39;s happening on the wires?&lt;/p&gt;
[quote userid="79478" url="~/f/nordic-q-a/50138/send-data-received-on-ble-nus-to-spi/200486"]on other side i am using another board with spis example[/quote]
&lt;p&gt;Have you got this working &lt;em&gt;&lt;strong&gt;without&lt;/strong&gt;&lt;/em&gt; BLE ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send data received on ble nus to SPI</title><link>https://devzone.nordicsemi.com/thread/200486?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:18:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc78c0a2-1a0d-4d1f-81ce-5b026d3681fa</guid><dc:creator>Satyamkr80</dc:creator><description>&lt;p&gt;on other side i am using another board with spis example, i am not getting any error while sending data, but receiving no output at spis board,&lt;/p&gt;
&lt;p&gt;Now i will try the solution provided by you, then i will update the same here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send data received on ble nus to SPI</title><link>https://devzone.nordicsemi.com/thread/200484?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 11:11:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a285a720-6048-4d44-814d-985ac31f5871</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What&amp;nbsp;is on the other side of the SPI bus? Do you get any error codes when trying to send the data with&amp;nbsp;nrf_drv_spi_transfer()?&lt;/p&gt;
&lt;p&gt;It may not be a good idea to place the call inside the for-loop. The SPI can send the whole buffer in one transfer. Try something like this before the for-loop:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_drv_spi_transfer(&amp;amp;spi, p_evt-&amp;gt;params.rx_data.p_data, p_evt-&amp;gt;params.rx_data.length, NULL, 0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;(I set the RX buffer to 0, as I do not know if you expect any response from the SPI slave).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>