<?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>Changing SPI frequency</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3643/changing-spi-frequency</link><description>Hi,
We&amp;#39;re using the SPI to communicate with a device that, when powered up, supports only up to 3Mbps SPI frequency , but after a while can work with higher frequencies.
Is it possible to change the SPI Master frequency on the fly with the nRF51822</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Sep 2014 07:42:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3643/changing-spi-frequency" /><item><title>RE: Changing SPI frequency</title><link>https://devzone.nordicsemi.com/thread/13228?ContentTypeID=1</link><pubDate>Mon, 01 Sep 2014 07:42:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25eeecdc-b3ec-40fd-9c22-94ae84353db2</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;I made some experiment on how to change the SPI frequency and modified the answer accordingly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing SPI frequency</title><link>https://devzone.nordicsemi.com/thread/13227?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2014 09:56:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03d76cde-acfe-45b3-9338-873198ffb83c</guid><dc:creator>Gili Elias</dc:creator><description>&lt;p&gt;Thanks for the update.
Basically, apart from the frequency, we don&amp;#39;t need any other configuration change.
The SPI close/open procedure resets a lot of the other parameters.
Will it be enough to just disable and re-enable the SPI through p_nrf_spi-&amp;gt;ENABLE, or are there other steps that needs to be taken? We want to shorten this process to the bare minimum needed for the frequency change.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing SPI frequency</title><link>https://devzone.nordicsemi.com/thread/13226?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2014 07:09:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d96e01b-d63d-4fef-9609-5ce896c469ea</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You can change the frequency by writing to the struct with e.g. :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; spi_config.SPI_Freq = SPI_FREQUENCY_FREQUENCY_M4;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, if you would like to change the SPI frequency on the fly, you can do that by writing directly to the frequency register of the SPI module that you are using, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_SPI0-&amp;gt;FREQUENCY = SPI_FREQUENCY_FREQUENCY_M4;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Make sure to change the frequency only when the SPI is not transmitting/receiving.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>