<?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>nRF52832 SPI Slave clock frequency.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59477/nrf52832-spi-slave-clock-frequency</link><description>Hi 
 We are developing by connecting nRF52832 to SMT32f303cb&amp;#39;s SPI interface. 
 SMT32f303cb operates as an SPI Master. 
 If the clock frequency of SPI Master is changed to 8Mhz, 4Mhz or 2Mhz, normal communication with nRF52832 operates only at 2Mhz. </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Mar 2020 10:03:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59477/nrf52832-spi-slave-clock-frequency" /><item><title>RE: nRF52832 SPI Slave clock frequency.</title><link>https://devzone.nordicsemi.com/thread/241762?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 10:03:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ef98d7f-e820-4653-961f-fb16b098b857</guid><dc:creator>awneil</dc:creator><description>[quote userid="86435" url="~/f/nordic-q-a/59477/nrf52832-spi-slave-clock-frequency/241694"]Do you know the nRF52832&amp;#39;s maximum frequency[/quote]
&lt;p&gt;As always, that will be in the &lt;strong&gt;datasheet&lt;/strong&gt; (aka &amp;quot;Product Specification&amp;quot;):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fstruct_nrf52%2Fstruct%2Fnrf52832.html&amp;amp;cp=3_2"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fstruct_nrf52%2Fstruct%2Fnrf52832.html&amp;amp;cp=3_2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;EDIT&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try that link again:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spis.html?cp=4_2_0_31_5#unique_631156952"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spis.html?cp=4_2_0_31_5#unique_631156952&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SPI Slave clock frequency.</title><link>https://devzone.nordicsemi.com/thread/241759?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 09:59:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f90c4b1-31a4-4647-a63c-99fa47124f9a</guid><dc:creator>awneil</dc:creator><description>[quote userid="86435" url="~/f/nordic-q-a/59477/nrf52832-spi-slave-clock-frequency/241694"]SPI Master has confirmed normal operation at 4Mhz and 8Mhz[/quote]
&lt;p&gt;How, exactly, has that been confirmed?&lt;/p&gt;
[quote userid="65515" url="~/f/nordic-q-a/59477/nrf52832-spi-slave-clock-frequency/241696"]The problem is the drive strength of the output pins, methinks[/quote]
&lt;p&gt;Note that the STM32 also has settings for this - so check there also.&lt;/p&gt;
[quote userid="65515" url="~/f/nordic-q-a/59477/nrf52832-spi-slave-clock-frequency/241696"]CS, SCK and MOSI pins which are output from the nRF52[/quote]
&lt;p&gt;No: the nRF is &lt;strong&gt;Slave&lt;/strong&gt; here - so those are all &lt;em&gt;inputs&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;MISO is an output on the Slave.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/chikyoung"&gt;Chikyoung&lt;/a&gt; - have you looked at the wires with an oscilloscope - that should show you if you have drive strength problems ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SPI Slave clock frequency.</title><link>https://devzone.nordicsemi.com/thread/241696?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 00:40:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:956900fe-6a27-4928-860a-f88443bcb7b3</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;The problem is the drive strength of the output pins, methinks. Try this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
//Edit: I misread the original post aw awneil points out; these are inputs
//      but need to be set to high-Drive on the ST
 nrf_gpio_cfg(APP_SPI0_CS_PIN,  NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_H0H1, NRF_GPIO_PIN_NOSENSE);
 nrf_gpio_cfg(APP_SPI_MOSI_PIN, NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_H0H1, NRF_GPIO_PIN_NOSENSE);
 nrf_gpio_cfg(APP_SPI_SCK_PIN,  NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_H0H1, NRF_GPIO_PIN_NOSENSE);

So just this on the nRF52: 
 nrf_gpio_cfg(APP_SPI_MISO_PIN,  NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_H0H1, NRF_GPIO_PIN_NOSENSE);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;or the equivalent in whatever IDE you are using; the idea is High Drive &amp;#39;1&amp;#39; and &amp;#39;0&amp;#39; for CS, SCK and MOSI pins which are output from the ST and MISO which is output from the nRF52 in order to get 4MHz, 8MHz or even 16MHz operation. This must be done &lt;em&gt;after&lt;/em&gt; the SPI initialisation, not before.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SPI Slave clock frequency.</title><link>https://devzone.nordicsemi.com/thread/241694?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 00:31:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b1a0f39-fa6f-4df7-8f9d-e2d1f779cd5a</guid><dc:creator>Chikyoung</dc:creator><description>&lt;p&gt;&lt;span&gt;Thank you for your reply.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I mean there&amp;nbsp;are issues with communications when the frequency is set higher.&lt;/p&gt;
&lt;p&gt;SPI Master has confirmed normal operation at 4Mhz and 8Mhz.&lt;/p&gt;
&lt;p&gt;However, It does not work when connected with nRF52832 in 4Mhz and 8Mhz.&lt;/p&gt;
&lt;p&gt;It worked fine at 2Mhz.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you know the nRF52832&amp;#39;s maximum frequency?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SPI Slave clock frequency.</title><link>https://devzone.nordicsemi.com/thread/241691?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 00:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee7ed3dc-4e10-4cd4-8bcc-20636e11ed74</guid><dc:creator>Chikyoung</dc:creator><description>&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;Do you know the nRF52832&amp;#39;s maximum frequency?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SPI Slave clock frequency.</title><link>https://devzone.nordicsemi.com/thread/241565?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2020 10:46:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a7b073b-fc5b-4924-adb4-b43ee8cced65</guid><dc:creator>awneil</dc:creator><description>[quote userid="14926" url="~/f/nordic-q-a/59477/nrf52832-spi-slave-clock-frequency/241559"]There is no frequency config on the nRF side for the SPIS peripheral, it will run at whatever frequency the SPI master uses[/quote]
&lt;p&gt;Indeed.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s the whole point of a synchronous link like SPI: the same would apply to &lt;em&gt;&lt;strong&gt;any&lt;/strong&gt; &lt;/em&gt;slave - not specific to nRF.&lt;/p&gt;
&lt;p&gt;(other that the physical limit on the maximum frequency of the slave&amp;#39;s hardware).&lt;/p&gt;
&lt;p&gt;Of course, the faster the data is going, the more careful you have to be with your slave&amp;nbsp; code to ensure that it has the capacity to handle the data ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SPI Slave clock frequency.</title><link>https://devzone.nordicsemi.com/thread/241559?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2020 10:36:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f80fc50f-2547-4e53-96df-3d53269b2056</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no frequency config on the nRF side for the SPIS peripheral, it will run at whatever frequency the SPI master uses, within the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spis.html#unique_517910321"&gt;SPIS electrical specifications&lt;/a&gt;.&lt;/p&gt;
[quote user=""]normal communication with nRF52832 operates only at 2Mhz[/quote]
&lt;p&gt;What exactly do you mean by this? Do the master not generate a clock faster than 2 MHz, or are there some issues with the communications when the frequency is set higher?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SPI Slave clock frequency.</title><link>https://devzone.nordicsemi.com/thread/241523?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2020 08:42:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:daa5352e-5464-4ce6-8076-efd2589c15d8</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5751._5F00_Insert-Code-_2D00_-Nordic-2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>