<?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>nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29051/nrf52840-spi-question</link><description>Hi, 
 Can someone help me with question on SPI? 
 What is the difference between SPIM and SPI? They seem to have different clocks
Also in the SPIM section, the frequency is said to be 32MHz in a number of places but then in one table again it is listed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Mar 2018 14:01:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29051/nrf52840-spi-question" /><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/124185?ContentTypeID=1</link><pubDate>Tue, 13 Mar 2018 14:01:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99daee8f-e0ed-4762-94ca-0362c676fa87</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Allen&lt;/p&gt;
&lt;p&gt;1) Yes, the SPIM3 module&amp;nbsp;is available and tested in the production silicon.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2) For all the details on the QSPI module you should read the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/qspi.html?cp=2_0_0_51#qspi_frontpage"&gt;QSPI chapter&lt;/a&gt; in the nRF52840 OPS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Essentially the QSPI module is not as generic as the other digital interfaces, as it is very much optimized to read, write and erase pages in external memory chips. It implements the command set for accessing these chips in the hardware itself, to streamline these operations and allow you to do things like Execute in Place, where code can be run directly from external memory without having to be loaded to internal memory first.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The drawback of this is that you can&amp;#39;t take full control over the 4 IO lines to do fully custom data exchange. There is a mechanism to send custom commands, but in this mode you are limited to 1 input line and 1 output line (like standard SPI), and the packet format is also restricted.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In other words, the QSPI is brilliant when connecting to external memory chips that support the same command set, but not so good if you are trying to connect to something else.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/124022?ContentTypeID=1</link><pubDate>Mon, 12 Mar 2018 17:37:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:913a53c3-091d-45c2-a7d3-413cebf16d12</guid><dc:creator>Allen Jameson</dc:creator><description>&lt;p&gt;Hi ovrebekk, this thread is very useful for me as I am developing a device that will use nrf52840 with an LCD display and am very interested in the higher-frequency SPI capability.&amp;nbsp; Can you confirm a couple points for me:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) Final silicon does in fact have 32MHz-capable single-mode SPI?&lt;/p&gt;
&lt;p&gt;2) With regard to your comment above, how is QSPI different from SPIM beyond enabling 2/4 channel IO?&amp;nbsp; We plan to use this for quad-read SPI flash so I&amp;#39;d like to better understand your comment about it being specialized.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115105?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 13:44:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3c03a87-fae0-4769-8dde-07d3ef226cd5</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Mickael&lt;/p&gt;
&lt;p&gt;We won&amp;#39;t have a fully functional SPIM3 module until the final silicon is released next month.&lt;/p&gt;
&lt;p&gt;The QSPI is much more specialized than the regular SPIM modules, and you won&amp;#39;t be able to use it as a regular SPI controller unfortunately.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115104?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 18:01:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b57f7eb5-652a-476f-b65b-42afed2eb7b3</guid><dc:creator>Mickael</dc:creator><description>&lt;p&gt;Other point related to this topic: could the NRF52840 QSPI interface in single SPI mode be also used as a 32MHz master SPI interface?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115103?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 17:39:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1003c1e2-40f0-49c3-8676-8b38ae4f586d</guid><dc:creator>Mickael</dc:creator><description>&lt;p&gt;Hi there, any update on this topic? Are the new silicon with SPIM3 enable to &amp;gt;8MHz released and tested yet?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115101?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2017 11:03:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13170029-6220-4cde-9bac-553e24db481c</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Florian&lt;/p&gt;
&lt;p&gt;At the moment I don&amp;#39;t know of any such limitation, but I think we have to wait for the production silicon to be sure. Once the final chip is out with the high speed SPI hardware in place we will have the measurements in place.&lt;/p&gt;
&lt;p&gt;It is not unlikely that some pins are better than other, in particular those that are far away from the radio circuit, since a 32MHz SPI signal is bound to generate noise.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115102?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2017 16:48:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f68d1463-5ade-40d2-87c9-ecd8102041f5</guid><dc:creator>Florian Zierer</dc:creator><description>&lt;p&gt;Are there any specific pins needed to use SPIM3 with 32MHz?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115100?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2017 13:02:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3a617a6-736d-4a38-b7b0-3ef9779f749c</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;No problem, hopefully it cleared things up :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115099?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 06:40:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db8f519c-871b-41f8-b7fa-bc4992077adc</guid><dc:creator>forrestDun</dc:creator><description>&lt;p&gt;Thanks for your excellent explanation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115108?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2017 14:47:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d04b274-7965-4b0c-a969-e0af34d386fa</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;The SPI in the nRF52832 is limited to 8MHz, there is no higher setting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115107?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2017 09:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b6bf7ae-5788-4a06-b791-2693cf674db6</guid><dc:creator>sean</dc:creator><description>&lt;p&gt;The spi clock of nrf52832 toooo low, anyone know howto set spi clock to 16M&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115106?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2017 09:25:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8951a997-ea5b-4cb3-a323-3e4f3748b833</guid><dc:creator>sean</dc:creator><description>&lt;p&gt;can I use spi 32bps on  nrf52832?
32bps only on nrf52840?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115098?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2017 07:15:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b74a6ebf-4cd2-4c09-b024-42d2b9c8d2c2</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Pranav&lt;/p&gt;
&lt;p&gt;The SPI interface is the old legacy SPI master carried over from the nRF51 series.
The SPIM is the new SPI master that uses DMA, originally introduced in the nRF52832.&lt;/p&gt;
&lt;p&gt;So far we have kept the SPI interface for backwards compatibility (so you can easily port code from the nRF51/nRF52832 that uses it), but it might be removed in future products, so I would recommend using the SPIM instead.
The SPIM interface is also more efficient since all the data transfer is handled by the DMA controller.&lt;/p&gt;
&lt;p&gt;The 32MHz mode refers to the new high speed SPIM interface in the nRF52840. Unfortunately this interface is unavailable in the preview part you have today, but it will be added to the production part released towards the end of the year.
This will be the NRF_SPIM3 interface, which means you still have all the old SPI and SPIM interfaces available (limited to 8MHz).&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115097?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2017 05:38:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:786d124c-94a3-4899-bacd-0ff7eeda24b6</guid><dc:creator>SRA</dc:creator><description>&lt;p&gt;Exactly. SPIM is just SPI Master.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SPI question</title><link>https://devzone.nordicsemi.com/thread/115096?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2017 04:30:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3911ed16-f716-431f-86b1-9fbc0245d24e</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;SPIM is where the MCU is the SPI Master (this is what you&amp;#39;d use to connect to a SPI peripheral e.g. a sensor.&lt;/p&gt;
&lt;p&gt;Re: SPI Frequency&lt;/p&gt;
&lt;p&gt;Normally you configure the frequency as part of the SPI driver initialisation&lt;/p&gt;
&lt;p&gt;e.g.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	uint8_t error;

	nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;	


	spi_config.frequency    = NRF_DRV_SPI_FREQ_8M;   
	spi_config.ss_pin   = 4;
	spi_config.sck_pin  = 5;
	spi_config.miso_pin = 6;
	spi_config.mosi_pin = 7;


	error = nrf_drv_spi_init(&amp;amp;spiBMP280, &amp;amp;spi_config, NULL);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>