<?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&amp;#39;s SPIS Frequency and Buffer.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59425/nrf52832-s-spis-frequency-and-buffer</link><description>I using nRF52832 with nRF SDK 16.0. 
 I tested the SPIS example in the SDK. 
 I want to change the SPI Clock frequency to 8Mhz and read max 255byte at once. 
 
 How to set the SPIS clock speed of nRF52832 to 8Mhz? 
 
 APP_ERROR-CHECK(nrf_drv_spis_buffers_set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Mar 2020 07:13:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59425/nrf52832-s-spis-frequency-and-buffer" /><item><title>RE: nRF52832's SPIS Frequency and Buffer.</title><link>https://devzone.nordicsemi.com/thread/241272?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 07:13:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83abe24f-2e88-44e6-a4a4-b3053de0733c</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]I want to change the SPI Clock frequency to 8Mhz and read max 255byte at once.[/quote]
&lt;p&gt;You might want to read up on &lt;a href="https://en.wikipedia.org/wiki/Serial_Peripheral_Interface"&gt;SPI communication&lt;/a&gt;, in case you have not done so already.&lt;br /&gt;Have you seen the SPIM Example? Clock frequency must be set by the SPI Master, and it is done during its initialization.&lt;br /&gt;Data transfer is usually done using 1 byte word size, but other word sizes may also be used.&lt;/p&gt;
[quote user=""]APP_ERROR-CHECK(nrf_drv_spis_buffers_set(&amp;amp;spis, 0, 0, &amp;amp;m_rx_buf[0][0], 1);[/quote]
&lt;p&gt;What exactly are you trying to do here, and why do you use a two dimensional array for your received bytes? The last argument you pass indicates that you buffer is length 1, which might not be what you were trying to do.&lt;/p&gt;
[quote user=""]I try to change the buffer size by the above function, but it did not work.[/quote]
&lt;p&gt;Have you seen the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fgroup__nrfx__spis.html&amp;amp;anchor=ga785f8f780f59f36a5a62b24edb3a0c8f"&gt;API Reference for the function&lt;/a&gt;?&lt;br /&gt;I suspect that I do not understand you fully on what you mean when you say &amp;quot;change the buffer size&amp;quot;, could you elaborate for me what you are trying to do?&lt;br /&gt;Are you attempting to increase the buffer size? If so, then you need to allocate more space to the m_rx_buf when it is initialized, and change the length inputted to&amp;nbsp;&lt;em&gt;nrf_drv_spis_buffers_set().&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>