<?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 problems with nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17248/spi-slave-problems-with-nrf51822</link><description>Hi, I can&amp;#39;t get SPI slave mode working on nRF51822. I&amp;#39;m using the Core51822 module with a BLE400 board from Waveshare and up to date mbed. SPISlave::receive() always returns 0, no matter what I pump into SCLK. NSS is connected to GND, that shouldn&amp;#39;t be</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 23 Oct 2016 16:06:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17248/spi-slave-problems-with-nrf51822" /><item><title>RE: SPI Slave problems with nRF51822</title><link>https://devzone.nordicsemi.com/thread/66244?ContentTypeID=1</link><pubDate>Sun, 23 Oct 2016 16:06:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a89f0aff-6cc2-451e-9d8b-2da3e496fe5f</guid><dc:creator>Szabolcs Sz&amp;#233;kelyi</dc:creator><description>&lt;p&gt;So it works now. Lessons learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;On the slave side you have to call SPISlave::reply() for each transaction before receive() and read() would work.&lt;/li&gt;
&lt;li&gt;On the master side you have to pulse the NSS signal for every transaction (set to low before sending and high afterwards). Just connecting it to GND will not work.&lt;/li&gt;
&lt;li&gt;SPISlave::frequency() has no use. No surprise, since the clock is generated by the master.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Slave problems with nRF51822</title><link>https://devzone.nordicsemi.com/thread/66243?ContentTypeID=1</link><pubDate>Sun, 23 Oct 2016 08:42:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa130f2b-e43a-4ba5-b181-9d30badcebc0</guid><dc:creator>Steven Kim</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;i found before similar problem on mbed site,&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.mbed.org/questions/68761/SPI-slave-16bit-mode-setup-nRF51-dk/"&gt;developer.mbed.org/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and can are you check the format and frequency?&lt;/p&gt;
&lt;p&gt;*The default format is set to 8-bits, mode 0, and a clock frequency of 1MHz&lt;/p&gt;
&lt;p&gt;thanks :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>