<?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 Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11659/spi-slave-problem-with-buffers-nrf51-sdk-v10---bug-in-nrf_drv_spis_event_t-structure</link><description>Hello, 
 I&amp;#39;ve been working with the SPI Slave on a nRF51-DK for several days. I am using the nRF51-DK (PCA10028), S130 v1.0.0 and SDK v10.0.0. First, I set up a RX and TX buffer of equal size (nrf_drv_spis_buffers_set() is called with same RX and TX</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Sep 2016 07:06:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11659/spi-slave-problem-with-buffers-nrf51-sdk-v10---bug-in-nrf_drv_spis_event_t-structure" /><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44083?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2016 07:06:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6a29880-10f8-48fd-b904-6a9af08b02d4</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;fixed in SDK12, look &lt;a href="https://devzone.nordicsemi.com/question/93241/what-are-sdk-1200-known-issues/"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44082?ContentTypeID=1</link><pubDate>Wed, 11 May 2016 04:00:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36458d43-06f3-4c76-9ad4-f194ec053e73</guid><dc:creator>utrank00</dc:creator><description>&lt;p&gt;If I set the tx buffer to 0, I expect the AMOUNTTX   to be 0 when the transfer complete.  But instead, the AMOUNTTX  always equal the the AMOUNTRX when the transfer complete.  This is why this issue did not became obvious.  I think this is a bug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44081?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2016 07:37:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7105b562-496f-45ff-bcc5-66968179de42</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;yes, unfortunately, and hence i reflected this in &lt;a href="https://devzone.nordicsemi.com/question/71366/what-are-sdk-1100-known-issues/"&gt;this&lt;/a&gt; thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44080?ContentTypeID=1</link><pubDate>Fri, 01 Apr 2016 11:35:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2da91cb8-2968-401e-a94f-511ad57e1bcb</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Uhm... the bug is still present in SDK11 official release :(&lt;/p&gt;
&lt;p&gt;Also, there seems to be no info about this bug in the relase notes...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44079?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 15:09:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b50a6026-2410-46d6-bd81-e0d460aec790</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I agree ..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44078?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 14:37:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6e76dc8-e5c4-450e-add1-b2de7c49134d</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Currently I am using SDK10 as SDK11 is still in alpha state. I can&amp;#39;t remember if I actually compiled my code with SDK11, but I definitely took a look at the release notes and there was no information about a fixed SPIS bugs. So I assumed the bug would still be present in SDK11 ;)&lt;/p&gt;
&lt;p&gt;Maybe not so many people use the SPI Slave interface (with a complex protocol), as this would suggest that there is another microcotroller which uses probably more power than the nRF5x. So this would not be a classic low power application. We are using the nRF5x in different scenarios where sometimes low energy consumption is crucial. In other cases, there is enough power available and the nRF5x just provides Bluetooth (Smartphone) support and sometimes sensor access for a device. Having the same software and hardware architecture makes development much easier :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44077?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 14:20:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa3f3b36-8ac7-4cdb-a35e-ae8ebe5d46ac</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Thanks for fixing my typo puz :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44076?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 14:19:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2af437c-4c7d-458e-8915-c5c2eaad72b5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I thought you were using SDK10 .. i am so surprised now that no one were bitten by this before. So all of them (before you) used same TX and RX buffer length. That is good to know info :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44075?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 14:09:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71b5a991-8d8f-4e17-80c8-798dbc4b84dd</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;I know (sorry for not mentioning SDK11). This is why I reported it ;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44074?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 14:08:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:867cf6c4-e318-49e5-af59-13e97fb5cfdc</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;My my......this is also a bug in SDK11_aplha ... :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44073?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 14:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff2585a8-a18f-4030-a133-a7bce2219bec</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;puz_md,&lt;/p&gt;
&lt;p&gt;Thanks for this report,&lt;/p&gt;
&lt;p&gt;I did some debug and found that this is a bug in the driver in file nrf_spis.h&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;__STATIC_INLINE uint8_t nrf_spis_tx_amount_get(NRF_SPIS_Type const * p_spis)
{
    return (uint8_t) p_spis-&amp;gt;AMOUNTRX;
}

__STATIC_INLINE uint8_t nrf_spis_rx_amount_get(NRF_SPIS_Type const * p_spis)
{
    return (uint8_t) p_spis-&amp;gt;AMOUNTTX;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here you can see clearly that wrong registers are fetched.
Correct them to the below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;__STATIC_INLINE uint8_t nrf_spis_tx_amount_get(NRF_SPIS_Type const * p_spis)
{
    return (uint8_t) p_spis-&amp;gt;AMOUNTTX;
}

__STATIC_INLINE uint8_t nrf_spis_rx_amount_get(NRF_SPIS_Type const * p_spis)
{
    return (uint8_t) p_spis-&amp;gt;AMOUNTRX;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I will add this in known bugs in &lt;a href="https://devzone.nordicsemi.com/question/57411/what-are-nrf51-sdk-100-known-issues/"&gt;here&lt;/a&gt; and register an internal ticket for the team to know about it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44070?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 10:33:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b0c25b3-a760-42d9-855f-5a4dbf72b771</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Thanks puz, I deleted the comment with the image .. i will update this thread when I have new info.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44072?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 09:39:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d47f3403-6cbe-4ea8-a772-2251880e6b6c</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;I&amp;#39;m not in a hurry as there is an easy workaroung (switching values). I just thought that you might want to fix this bug before the next SDK is released.&lt;/p&gt;
&lt;p&gt;Can you please remove the image from your previous comment? Please see my private message for details. Thanks a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44069?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 07:50:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:130ca586-3a39-47b7-9670-ccddfa9611b4</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You are right, the output from the hex you mentioned seems wrong, i will try to look into it, cannot promise that it will be today ..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44071?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2016 14:08:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea66c4c5-d3e7-492c-bb77-8fdd831738f6</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Accidentially, my .zip file contained old binaries in the output folder (which you used - they switched the variables for the software to work correctly). The correct binary from the test code should be called &amp;quot;SPIS_Test.hex&amp;quot;. Can you please try again with this one?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44068?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2016 12:19:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d09b8761-73cf-4dc7-bd32-280308160ccb</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;ill take a look at it today.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44067?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2016 10:58:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e22e120-d777-449e-852c-6781a292e6b3</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Hi Aryan, I appended some test code and a short description to my initial post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problem with buffers (nRF51, SDK v10) - Bug in nrf_drv_spis_event_t structure?</title><link>https://devzone.nordicsemi.com/thread/44066?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2016 08:01:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f73ffd0d-1f16-4e74-8cdd-2f4c7ffcf9b7</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;can you help me reproduce this problem? please send me your project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>