<?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 configuration ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13006/spi-configuration</link><description>Hi, 
 I&amp;#39;m trying to configure the SPI by using the nrf_drv_spi. the problem that I&amp;#39;m facing is the configuration of the &amp;quot;spi_config.SPI_CPHA = SPI_CONFIG_CPHA_Leading&amp;quot; which exict in the &amp;quot;spi_master.h&amp;quot; &amp;amp; not in the &amp;quot;nrf_drv_spi.h&amp;quot;. 
 what should i do</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Apr 2016 09:20:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13006/spi-configuration" /><item><title>RE: spi configuration ?</title><link>https://devzone.nordicsemi.com/thread/49576?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2016 09:20:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ba11342-272d-4471-a369-626058a2b88b</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;This is specified by the   by the &lt;code&gt;nrf_drv_spi_mode_t&lt;/code&gt; field in the the &lt;code&gt;nrf_drv_spi_config_t&lt;/code&gt; struct. The SPI peripheral can be set up in the following 4 modes:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_DRV_SPI_MODE_0 -	SCK active high, sample on leading edge of clock.
NRF_DRV_SPI_MODE_1 -	SCK active high, sample on trailing edge of clock.
NRF_DRV_SPI_MODE_2 -	SCK active low, sample on leading edge of clock.
NRF_DRV_SPI_MODE_3 -	SCK active low, sample on trailing edge of clock.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Please refer the SPI Master documentation on our Infocenter, found &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/hardware_driver_spi_master.html?cp=4_0_0_2_12"&gt;here&lt;/a&gt;. The &lt;code&gt;nrf_drv_spi_config_t&lt;/code&gt; struct is documented &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/structnrf__drv__spi__config__t.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;-Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>