<?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>Sending single bytes over hw SPI; 0xFF appended every other time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16401/sending-single-bytes-over-hw-spi-0xff-appended-every-other-time</link><description>Hi, I am using nRF SDK 12.0.0_12f24da, with nRF52832 on pca10040 hardware, and working with the example in examples/peripheral/spi/main.c 
 Initially I was working on integrating a library, and found via logic analyzer that every other SPI byte output</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Aug 2018 23:05:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16401/sending-single-bytes-over-hw-spi-0xff-appended-every-other-time" /><item><title>RE: Sending single bytes over hw SPI; 0xFF appended every other time</title><link>https://devzone.nordicsemi.com/thread/145195?ContentTypeID=1</link><pubDate>Tue, 21 Aug 2018 23:05:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afe22312-f968-42a5-936b-4bda1f3ad044</guid><dc:creator>feistyz</dc:creator><description>&lt;p&gt;Turning off easy DMA seems to fix this issues as well. Of course, that&amp;#39;s far from great as it disables DMA.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//In sdk_config.h
#ifndef SPI0_USE_EASY_DMA
#define SPI0_USE_EASY_DMA 0
#endif&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending single bytes over hw SPI; 0xFF appended every other time</title><link>https://devzone.nordicsemi.com/thread/128363?ContentTypeID=1</link><pubDate>Sun, 15 Apr 2018 17:22:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbfaad3d-3dfc-44b4-a4c1-6006e3b06249</guid><dc:creator>leonhart88</dc:creator><description>&lt;p&gt;You can also achieve single byte transfers by doing something like the following:&lt;/p&gt;
&lt;p&gt;nrf_drv_spi_transfer(&amp;amp;m_spi_master_0, spiTransmitBuffer, 1, NULL, 0);&lt;br /&gt;&lt;br /&gt;This has worked for me when needing to do a single byte command for peripherals in order to set registers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending single bytes over hw SPI; 0xFF appended every other time</title><link>https://devzone.nordicsemi.com/thread/62797?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2017 01:08:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2e57d27-ff94-42c4-b924-8559e3dba5ae</guid><dc:creator>Ed</dc:creator><description>&lt;p&gt;This is a very big flaw in the product&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending single bytes over hw SPI; 0xFF appended every other time</title><link>https://devzone.nordicsemi.com/thread/62796?ContentTypeID=1</link><pubDate>Thu, 15 Sep 2016 06:47:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:beca66e8-8879-42d1-982d-6e195603b2c0</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;It will probably be low priority since there is a software workaround for this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending single bytes over hw SPI; 0xFF appended every other time</title><link>https://devzone.nordicsemi.com/thread/62791?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2016 17:12:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0e1e32e-19c4-47be-9942-54a31cfed158</guid><dc:creator>nordictester</dc:creator><description>&lt;p&gt;Evidently this is an issue with all nRF52832 ICs released as of September, 2016, including Engineering revs A, B, and C, and Rev 1.  This includes ICs marked QFAA-B00, CHAA-B00, CIAA-B00, QFAA-BB0, CHAA-BA0, CIAA-BA0, QFAA-BA0, CHAA-AA0, QFAA-AA0, QFAA-AC0, CGAA-AA0.  Hope this helps someone&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending single bytes over hw SPI; 0xFF appended every other time</title><link>https://devzone.nordicsemi.com/thread/62793?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2016 17:07:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:844fe2bd-57a9-45ff-91e9-6db09f535ed5</guid><dc:creator>nordictester</dc:creator><description>&lt;p&gt;thanks for the quick response&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending single bytes over hw SPI; 0xFF appended every other time</title><link>https://devzone.nordicsemi.com/thread/62795?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2016 17:07:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96570925-dac3-44c0-b093-0b0b6e9c4e7e</guid><dc:creator>nordictester</dc:creator><description>&lt;p&gt;Thanks, is this going to be fixed in the next chip revision? Seems like a pretty big flaw.  Would probably be helpful to make note of this in the nRF52 sdk documentation, on the spi master driver page.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending single bytes over hw SPI; 0xFF appended every other time</title><link>https://devzone.nordicsemi.com/thread/62794?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2016 11:17:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6c5910c-3888-47c4-8a92-8809cc09b1a5</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Nordictester,&lt;/p&gt;
&lt;p&gt;as @rols (RK) explains, this is a known issue with the nRF52, &lt;strong&gt;[58] SPIM: An additional byte is clocked out when RXD.MAXCNT = 1&lt;/strong&gt;, which is described &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=/com.nordic.infocenter.nrf52832.Rev1.errata/anomaly_832_58.html&amp;amp;cp=2_2_1_0_1_8"&gt;here&lt;/a&gt; in the errata.&lt;/p&gt;
&lt;p&gt;I have added the workaround desecribed in the errata to the peripheral SPI example from the SDK( /examples/peripheral/spi), the modified example is attached. Please note that the workaround is implemented using the PPI and GPIOTE drivers and not writting directly to the peripheral registers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Attachment:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/spi_5F00_pan58_5F00_workaround_5F00_sdk12.zip"&gt;spi_pan58_workaround_sdk12.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; The zip must be extracted to &lt;strong&gt;SDK-folder/examples/peripheral&lt;/strong&gt;, otherwise the include paths will be incorrect.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending single bytes over hw SPI; 0xFF appended every other time</title><link>https://devzone.nordicsemi.com/thread/62792?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2016 00:02:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dd71361-9539-47f4-8a31-14ba9307267f</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;All documented in the errata section&lt;/p&gt;
&lt;p&gt;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.Rev1.errata%2Fanomaly_832_58.html&amp;amp;cp=2_2_1_0_1_8"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>