<?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>nRF51822 SPI max clock?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5045/nrf51822-spi-max-clock</link><description>Hi,
Can someone tell me (definitively) what the max SPI clock speed is?
I have seen 2,4 and 8Mhz here and in recent documentation and I&amp;#39;m confused. 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Jan 2015 10:43:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5045/nrf51822-spi-max-clock" /><item><title>RE: nRF51822 SPI max clock?</title><link>https://devzone.nordicsemi.com/thread/17773?ContentTypeID=1</link><pubDate>Fri, 09 Jan 2015 10:43:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a09fa18-8298-41c8-a2a3-1e50a544af84</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The Max speed for SPI master is 4Mbps. The nRF51822 PS is the documentation that should be valid . This is stated in nRF51822 PS v3.1, table 47.&lt;/p&gt;
&lt;p&gt;For SPI slave, the max speed is specified to 2Mbps in nRF51822 PS v3.1, table 45. However, with the third revision of the nRF51 hardware should allow 4Mbps SPIS speed. To enable this, the SPI slave must be the only peripheral using a specific RAM block. RAM block layout is described in nRF51822 PS v3.1, table 6.&lt;/p&gt;
&lt;p&gt;So the way to do this is to devide the RAM into two sections in Keil -&amp;gt; Options for Target and then assign the spi_slave.c RAM to the IRAM2 section as shown in the following images.&lt;/p&gt;
&lt;p&gt;RAM configuration for S110 softdevice, 32kB RAM (e.g. nRF51 QFAC variant) could be:
&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Capture-_2D00_-RAM-sections-seperation-in-KEIL-_2D00_-S110-_2D00_-32kB-RAM.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;RAM configuration for S110 softdevice, 16kB RAM (e.g. nRF51 QFAA variant) could be:
&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Capture-_2D00_-RAM-sections-seperation-in-KEIL-_2D00_-S110-_2D00_-16kB-RAM.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Capture-_2D00_-spi_5F00_slave-settings.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;Note that this configuration may be different for other softdevices as they use different amount of RAM, see Softdevice Specification (SDS) for the relevant softdevice, chapter about resource usage. Compatibility of different SDS&amp;#39;s and softdevices is listed in the &lt;a href="https://www.nordicsemi.com/eng/nordic/Products/nRF51822/ATTN-51/41917"&gt;nRF51 compatibility matrix&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the 16kB RAM variant configuration however, only 4kB of RAM remain for the application, and 2kB of that are already used for the softdevice and application stacks, see &lt;a href="https://devzone.nordicsemi.com/question/1088/putting-my-app-on-a-ram-memory-diet/"&gt;this thread&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/21787/available-ram-for-the-application/"&gt;this thread&lt;/a&gt;. It can be seen in the .map file in the _build folder how much RAM is actually used by the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>