<?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>SPIM writes with address offset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39426/spim-writes-with-address-offset</link><description>I&amp;#39;m developing a custom driver (C++) for the SPI master. Somewhere I&amp;#39;ve made a mistake, where the first received byte is written with a memory offset in SPI mode 1. I.e. we expect the slave to return three bytes [0x0C 0xA3 0xC0], but we must read four</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Oct 2018 14:38:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39426/spim-writes-with-address-offset" /><item><title>RE: SPIM writes with address offset</title><link>https://devzone.nordicsemi.com/thread/152916?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 14:38:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:641c2581-a726-479e-9320-4ea29a9150a0</guid><dc:creator>obbe</dc:creator><description>&lt;p&gt;Good idea! I&amp;#39;ll poke around in the examples and drivers and see what I can find.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Edit:&amp;nbsp;&lt;/em&gt;Somehow, this seems to magically have resolved itself. Suddenly, it started spitting out garbage data again, and when I troubleshoot it, lo and behold, the data was now stored correctly in the buffer. I could swear I cleaned the build several times, but I&amp;#39;m going to blame bad build for now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM writes with address offset</title><link>https://devzone.nordicsemi.com/thread/152914?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 14:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f75f7334-83f6-42a5-8cd4-c56e8d540cbb</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;My suggestion here is to take the&amp;nbsp;\nRF5_SDK_15.2.0_9412b96\examples\peripheral\spi and use that as reference. The&amp;nbsp;NRF_SPIM_TASK_START is called in&amp;nbsp;spim_xfer() for example, you may set a breakpoint prior to this to check all spim configuration.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM writes with address offset</title><link>https://devzone.nordicsemi.com/thread/152858?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 11:48:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc8e10a6-267c-4dc3-95ed-bea03249482b</guid><dc:creator>obbe</dc:creator><description>&lt;p&gt;Yes, here is a screenshot from the oscilloscope. In this case we&amp;#39;re also outputting a command, but its not relevant for this case. What I expected to receive from this was a RX buffer of 0x0C 0xC4 0x75 0xFF, but instead it contained 0x?? 0x0C 0xC4 0x75.&lt;/p&gt;
&lt;p&gt;Yes, I&amp;#39;m aware of the parallel byte. This is (in my opinion) a slightly odd IC in that it doesn&amp;#39;t receive a command prior to outputting the data.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/420x280/__key/communityserver-discussions-components-files/4/RSC_5F00_DataRead.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM writes with address offset</title><link>https://devzone.nordicsemi.com/thread/152855?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 11:40:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4986c1e3-ad31-4af7-a500-edb6b678f08b</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do you have a screenshot of CSN, SCK, MISO, and MOSI when this occurs? Are you sure you are taking into account that there will be a byte in parallel on MISO when for instance the command byte is sent on MOSI.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>