<?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</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45876/spi-slave</link><description>This application uses a Rigado nRF52840 module to collect SPI data from 2 peripherals in slave mode. I have been unable to get the SPIS example running in the target board using the SDK 15.0 example with minimal changes (I added a couple of lines to handle</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Apr 2019 20:13:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45876/spi-slave" /><item><title>RE: SPI slave</title><link>https://devzone.nordicsemi.com/thread/181414?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 20:13:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:795ff6a9-25dc-4538-85a8-72f08fa66ac6</guid><dc:creator>henryh</dc:creator><description>&lt;p&gt;I have resolved this issue and it was a data problem.&amp;nbsp; I assumed that the incoming data could not be all &amp;#39;0&amp;#39; and this led me to assume I was not receiving data.&amp;nbsp; The data was from an ADC but switching to a logic signal at the MOSI pin (one synchronized to the SPIS clock) allowed me to verify that the SPIS peripheral was working correctly.&amp;nbsp; Now to figure out why the ADC is acting like that... :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI slave</title><link>https://devzone.nordicsemi.com/thread/181345?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 13:34:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4befdedf-8836-4c08-95cc-7f2abccaaf41</guid><dc:creator>henryh</dc:creator><description>&lt;p&gt;Thanks for the suggestion but I have done a thorough timing analysis and it is definitely mode &amp;quot;0&amp;quot;.&amp;nbsp; In this case I should see some data (even if it is mangled) but all am getting is &amp;quot;0&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI slave</title><link>https://devzone.nordicsemi.com/thread/180825?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 14:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fa053fa-bb79-464e-a834-a649ba6d3032</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can you try all the SPI modes?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_DRV_SPIS_DEFAULT_CONFIG sets .mode =&amp;nbsp;NRF_SPIS_MODE_0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Maybe your other devices uses one of the other modes?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * @brief SPI modes.
 */
typedef enum
{
    NRF_SPIS_MODE_0, ///&amp;lt; SCK active high, sample on leading edge of clock.
    NRF_SPIS_MODE_1, ///&amp;lt; SCK active high, sample on trailing edge of clock.
    NRF_SPIS_MODE_2, ///&amp;lt; SCK active low, sample on leading edge of clock.
    NRF_SPIS_MODE_3  ///&amp;lt; SCK active low, sample on trailing edge of clock.
} nrf_spis_mode_t;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Try setting e.g. NRF_SPIS_MODE_1:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    nrf_drv_spis_config_t spis_config = NRF_DRV_SPIS_DEFAULT_CONFIG;
    spis_config.mode                  = NRF_SPIS_MODE_1;
    spis_config.csn_pin               = APP_SPIS_CS_PIN;
    spis_config.miso_pin              = APP_SPIS_MISO_PIN;
    spis_config.mosi_pin              = APP_SPIS_MOSI_PIN;
    spis_config.sck_pin               = APP_SPIS_SCK_PIN;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And of course, test the ..._MODE_2 and ..._MODE_3 as well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>