<?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>Freeze/Halt the SPI SCK line while still sending data on MOSI?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21816/freeze-halt-the-spi-sck-line-while-still-sending-data-on-mosi</link><description>Bit of an odd question but Im dealing with a rather wonky SPI peripheral and its got me trying to sort some interesting questions due to its strange data protocol. Im using an NRF52 and on SDK12.2 with the soft device enabled. 
 The chip Im working with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 May 2017 14:49:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21816/freeze-halt-the-spi-sck-line-while-still-sending-data-on-mosi" /><item><title>RE: Freeze/Halt the SPI SCK line while still sending data on MOSI?</title><link>https://devzone.nordicsemi.com/thread/85702?ContentTypeID=1</link><pubDate>Wed, 17 May 2017 14:49:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1808e6a-4af4-4320-90b7-80dff15e7d21</guid><dc:creator>dmf3030</dc:creator><description>&lt;p&gt;So this answer worked for me,  I did encounter issues with moving the SCK to disconnected and in the end I just shifted it to an unused pin, sent my latch data and then shifted it back.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_SPI0-&amp;gt;PSEL.SCK = 25;
nrf_drv_spi_transfer(&amp;amp;spi, buff_latch2, 14, m_rx_buf, 0);
NRF_SPI0-&amp;gt;PSEL.SCK = 12;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Freeze/Halt the SPI SCK line while still sending data on MOSI?</title><link>https://devzone.nordicsemi.com/thread/85703?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 02:36:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:934b6f15-9385-4ba8-8c47-e4929101a0b0</guid><dc:creator>dmf3030</dc:creator><description>&lt;p&gt;Interesting, Ill have to try this as it seems like exactly what I needed, thanks! On a side note when I would reinit the spi with no SCK I was able to correctly send my pulses on the data line without the clock toggling but I did notice what seemed like a much longer lag than expected between the NRF sending my single bytes.  I wonder if the SPI has a time out when there is no SCK, so it may be true the SCK must be connected in order for SPI to work correctly, in my case no SCK just means a slower data transfer which is fine.  We&amp;#39;ll have to see what happens.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Freeze/Halt the SPI SCK line while still sending data on MOSI?</title><link>https://devzone.nordicsemi.com/thread/85701?ContentTypeID=1</link><pubDate>Thu, 04 May 2017 20:44:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad3dfe45-a08d-4c52-9d3e-61fa651c7e65</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;You can actually just disconnect the SPI peripherial from the pins using &lt;code&gt;PSEL.XXX&lt;/code&gt; registers, for example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_SPI0-&amp;gt;PSEL.SCK = SPI_PSEL_SCK_PSELSCK_Disconnected;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will restore basic GPIO function. Later just reconnect the pin by writing the correct number.&lt;/p&gt;
&lt;p&gt;You might have to bitbang MOSI, though - the SCK &lt;strong&gt;must&lt;/strong&gt; be connected according to the manual for SPI to work correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>