<?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 three lines mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15097/spi-three-lines-mode</link><description>I want to use the SPI in master mode, but the slave just have three lines,the miso and the mosi is the same line,but I don&amp;#39;t know how to config the pins? Do the nRF52832 supports this mode? if YES,could you tell me how to use it or some examples to reference</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Sep 2017 08:18:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15097/spi-three-lines-mode" /><item><title>RE: SPI three lines mode</title><link>https://devzone.nordicsemi.com/thread/57666?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2017 08:18:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0644aa49-e547-4a37-a499-6b203112d521</guid><dc:creator>Bastien Reynard</dc:creator><description>&lt;p&gt;Worked for me too, thanks atune.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI three lines mode</title><link>https://devzone.nordicsemi.com/thread/57665?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 15:15:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4650aa2a-b894-4150-8c14-77027b84f159</guid><dc:creator>atune</dc:creator><description>&lt;p&gt;Sorry for digging up an old question, but I just had to make a sensor with only &amp;quot;3-wire SPI&amp;quot; work with nRF52. Didn&amp;#39;t see a similar answer (sorry if I missed it) and this seemed as good as any to blurt out my own solution.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/54241/3-wire-interface-on-nrf52/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt; is a hardware solution that should work as RK mentioned, but I had to preferably solve it in software.&lt;/p&gt;
&lt;p&gt;A software solution that worked for me (reading a register) using the vanilla nrf_drv_spi:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;(SPI is uninitialised when not in use)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Initialise SPI with MOSI as [SDIO_PIN] and MISO &amp;amp; CS as NRF_DRV_SPI_PIN_NOT_USED&lt;/li&gt;
&lt;li&gt;Assert CS&lt;/li&gt;
&lt;li&gt;Make a pure tx transfer &lt;code&gt;(instance, tx_buf, tx_len, NULL, 0)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Uninitialise SPI&lt;/li&gt;
&lt;li&gt;Initialise SPI with MISO as [SDIO_PIN] and MOSI &amp;amp; CS as NRF_DRV_SPI_PIN_NOT_USED&lt;/li&gt;
&lt;li&gt;Make a pure rx transfer &lt;code&gt;(instance, NULL, 0, rx_buf, rx_len)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Deassert CS&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(Uninitialise SPI)&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I guess some sensors might throw a hissy fit in between the transfers if there&amp;#39;s too much delay, but at least I got it working with my own setup.&lt;/p&gt;
&lt;p&gt;Anyhoo hope this helps someone in the same situation in the future.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI three lines mode</title><link>https://devzone.nordicsemi.com/thread/57663?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2016 13:26:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b259efb5-31ea-428f-aa7e-dc019dfefe35</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Could sound like Maxim&amp;#39;s 3-Wire/Microwire.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI three lines mode</title><link>https://devzone.nordicsemi.com/thread/57664?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2016 12:18:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e02766af-3111-4b91-a2b8-930571b560a8</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;No the nRF52 (and the nRF51) don&amp;#39;t support 3-wire SPI mode. Not that many chips do, it&amp;#39;s not a very usual protocol. I did see a diagram somewhere (and it was Nordic-related) someone was using two resistors to join the MISO and MOSI of a standard SPI interface and hook it up to a 3-wire SPI slave. I wasn&amp;#39;t entirely sure it would work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI three lines mode</title><link>https://devzone.nordicsemi.com/thread/57662?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2016 12:00:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f9a8930-f6f6-4227-983e-e2d47c8c0fd5</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;you sure this is SPI? what is the name of the module?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>