<?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 Master not working with Flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4049/spi-master-not-working-with-flash</link><description>I am working with the nrf51822 eval kit and custom boards based on the Laird BL600 module. I am using SDK v5.2. 
 I am trying to connect to external Flash (Microchip SST25VF016B) through SPI 1. No matter what I do, the Flash returns 0xFF. 
 I have tried</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Oct 2014 14:45:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4049/spi-master-not-working-with-flash" /><item><title>RE: SPI Master not working with Flash</title><link>https://devzone.nordicsemi.com/thread/14519?ContentTypeID=1</link><pubDate>Mon, 13 Oct 2014 14:45:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85a7ed1d-3cb0-412f-b371-08c2d60325f4</guid><dc:creator>eric ely</dc:creator><description>&lt;p&gt;That was it. Wow, that was a pretty stupid mistake on my part. I spent hours pouring over the SPI spec and datasheets, and somehow I just missed that. Thanks for the extra eyes and spotting this!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master not working with Flash</title><link>https://devzone.nordicsemi.com/thread/14518?ContentTypeID=1</link><pubDate>Mon, 13 Oct 2014 12:23:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1a692fb-61a7-4cda-af46-e80df2a7d2f1</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;So you have your flash configured as SPI slave and are using the SPI master on the nRF51 (BL600), if I understand you correctly.&lt;/p&gt;
&lt;p&gt;Too bad you do not have a scope, that would be my first suggestion to debug the issue, to see what is the difference in output from the SPI master on the Arduino Pro Mini and the nRF51. As a cheaper option, I would recommend you to get a hold of logical analyzer, e.g. &lt;a href="https://www.saleae.com/logic"&gt;this one&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You could perhaps set leds on your board when there is an activity on the SPI pins, just too see that it is actually having activity as expected. But the only good way is to measure the actual communication on the pins. You can then analyse the signals yourself and/or send a snapshot of the signal output to us for further analysis.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Master not working with Flash</title><link>https://devzone.nordicsemi.com/thread/14517?ContentTypeID=1</link><pubDate>Mon, 13 Oct 2014 12:12:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da22339b-e8eb-442b-bca0-2443e2b390ae</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;I analyzed both of the SPI transfers for the two codes on an Arduino and the nRF51822. The only difference between them is that on the nRF51822 the SS pin is set high and low again between every byte transfer.&lt;/p&gt;
&lt;p&gt;Try to add a &lt;code&gt;bool stop_condition&lt;/code&gt; as an argument to the &lt;code&gt;spi_master_tx_rx()&lt;/code&gt; and change the last line in the function to this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if(stop_condition){
    nrf_gpio_pin_set(SEL_SS_PINOUT);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now you can set the SS pin high after the last byte only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>