<?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>How can i set spis rx buffer length on nrf52832 SDK13?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29898/how-can-i-set-spis-rx-buffer-length-on-nrf52832-sdk13</link><description>Hi， 
 i defined spis rx and tx buffer length at: 
 #define HUB_SPIS_RECV_BUFF_SIZE	1024
#define HUB_SPIS_SEND_BUFF_SIZE	1024
 
 because the rx data length will be vary, so i set: 
 hub_spis_recv_len=HUB_SPIS_RECV_BUFF_SIZE;
	nrf_drv_spis_buffers_set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 Jan 2018 08:59:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29898/how-can-i-set-spis-rx-buffer-length-on-nrf52832-sdk13" /><item><title>RE: How can i set spis rx buffer length on nrf52832 SDK13?</title><link>https://devzone.nordicsemi.com/thread/118908?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2018 08:59:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba459283-ee69-478f-847b-ff87f7451114</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, that is correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i set spis rx buffer length on nrf52832 SDK13?</title><link>https://devzone.nordicsemi.com/thread/118909?ContentTypeID=1</link><pubDate>Sat, 27 Jan 2018 01:58:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:103c5ac5-2ae9-4e48-aefb-942fbb578004</guid><dc:creator>freedom118</dc:creator><description>&lt;p&gt;Dear Jorgen，&lt;/p&gt;
&lt;p&gt;I see. Thanks a lot. so if i want to send or receive a message longer than 255, i need to split and concat the message to packet which max length is 255.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i set spis rx buffer length on nrf52832 SDK13?</title><link>https://devzone.nordicsemi.com/thread/118907?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2018 09:59:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d58c4de6-054c-4cf4-bd5f-752e66bcc09a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spis.html?cp=2_1_0_31#concept_z12_hz2_wr"&gt;SPIS peripheral&lt;/a&gt; on nRF52832 use &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spis.html?cp=2_1_0_31_1#concept_zz1_cz2_wr"&gt;EasyDMA&lt;/a&gt; to store the received data directly in RAM buffer. EasyDMA have a limit on buffer size of 255 bytes, as seen from the documentation of the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spis.html#register.RXD.MAXCNT"&gt;RXD.MAXCNT register&lt;/a&gt;, which is only 8 bits wide.&lt;/p&gt;
&lt;p&gt;In the API documentation of &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/group__nrf__drv__spis.html#gaaa1019f7f53bf3183c3403ff24775dbe"&gt;nrf_drv_spis_buffers_set()&lt;/a&gt;, the type of the parameter &lt;code&gt;rx_buffer_length&lt;/code&gt; is uint8_t, i.e., an 8-bit variable. When you assign 1024 to this variable, it will overflow and you are left with the 8 lower bits of the number (1024 dec = 0100 &lt;strong&gt;0000 0000&lt;/strong&gt; bin).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>