<?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>send more than 255 bytes by spi, nrf52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16580/send-more-than-255-bytes-by-spi-nrf52</link><description>I&amp;#39;m communicating with N25 flash memory, the page size is 256 bytes. there is a page_program command which can write up to 256 bytes. there is no way to write in the middle of page (page @ + offset). 
 the issue it that SPI function has size parameter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Jun 2021 00:16:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16580/send-more-than-255-bytes-by-spi-nrf52" /><item><title>RE: send more than 255 bytes by spi, nrf52</title><link>https://devzone.nordicsemi.com/thread/315019?ContentTypeID=1</link><pubDate>Mon, 14 Jun 2021 00:16:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:448a832c-acb1-4437-87ee-b958adc5d35f</guid><dc:creator>Sumen</dc:creator><description>&lt;p&gt;Been a pity on 64MHz. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;br /&gt;But BLE + ARM good work. Thanks, Nordicsemi.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send more than 255 bytes by spi, nrf52</title><link>https://devzone.nordicsemi.com/thread/189186?ContentTypeID=1</link><pubDate>Mon, 27 May 2019 06:19:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ffc0709-dc40-42d8-b160-f09b900c49da</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The answer from RK describes this perfectly:&lt;/p&gt;
[quote user="rols"]it&amp;#39;s uint8_t because the DMA is limited to 255 and the SDK is designed to be compatible with the chips which do and don&amp;#39;t have it.[/quote]
&lt;p&gt;The point is that the DMA of the nRF52832 is limited to 8 bits length field. So it does not matter what you do in SW, you still cannot buypass this HW limitation.&lt;/p&gt;
&lt;p&gt;Note that the nRF52832 was the only device in the 52 series when this thread was created. Now there are other nRF52 devices which support longer DMA transfers (for instance&amp;nbsp;MAXCNT for the nRF52840 is 16 bit, even though it is only 8 for the nRF52832).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send more than 255 bytes by spi, nrf52</title><link>https://devzone.nordicsemi.com/thread/189120?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 23:33:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1904684-10da-484c-91c7-31fee669980d</guid><dc:creator>Kolonka</dc:creator><description>&lt;p&gt;did you changed the xxx_buffer_length&amp;#39;s to uint16_t or the&amp;nbsp;p_xxx_buffer?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send more than 255 bytes by spi, nrf52</title><link>https://devzone.nordicsemi.com/thread/63425?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2017 23:09:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d99bf205-077c-43bb-9136-63a650f9fce8</guid><dc:creator>mfdevzone</dc:creator><description>&lt;p&gt;If the type was set to &lt;code&gt;uint16_t&lt;/code&gt; instead of &lt;code&gt;uint8_t&lt;/code&gt; it would still be compatible with 255-byte limits for DMA (just don&amp;#39;t use more than 255). Pushing such a hardware specialization/restriction in to software used more broadly than DMA is a software mistake.&lt;/p&gt;
&lt;p&gt;Re Modifying the SDK: Even if you have source, once modified, you now have to maintain it across SDK upgrades. Avoiding changes is a good idea.&lt;/p&gt;
&lt;p&gt;Re: Stack/SDK. &amp;#39;Stack&amp;#39; is often used as a broad term to refer to &amp;quot;the software stack&amp;quot; entire.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send more than 255 bytes by spi, nrf52</title><link>https://devzone.nordicsemi.com/thread/63426?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2017 22:57:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2cc0c71-f4e2-40f7-a974-75e13d554b62</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;it&amp;#39;s uint8_t because the DMA is limited to 255 and the SDK is designed to be compatible with the chips which do and don&amp;#39;t have it.
And this isn&amp;#39;t the stack, this is the SDK, and you can do whatever you like with it. I treat it as reference code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send more than 255 bytes by spi, nrf52</title><link>https://devzone.nordicsemi.com/thread/63424?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2017 22:51:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be750eb2-ca86-4eb5-853e-9376ca682182</guid><dc:creator>mfdevzone</dc:creator><description>&lt;p&gt;In my opinion this is an error in the Nordic spi driver implementation, as maximum SPI write length should be set more explicitly, rather than simply because they use &lt;code&gt;uint8_t&lt;/code&gt; for the rx_ and tx_ buffer length values.&lt;/p&gt;
&lt;p&gt;I modified this (and tested it, though not a huge amount) by changing &lt;code&gt;nrf_drv_spi.c and .h&lt;/code&gt; to use uint16_t for rx and tx buffers, as well as &lt;code&gt;bytes_transferred&lt;/code&gt; in the &lt;code&gt;spi_control_block_t&lt;/code&gt; struct.&lt;/p&gt;
&lt;p&gt;I generally dislike modifying the stack but they provide source and this is an annoying constraint.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send more than 255 bytes by spi, nrf52</title><link>https://devzone.nordicsemi.com/thread/63423?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2016 13:19:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f0d8f2e-a490-4cfa-8eae-6f3665b3157b</guid><dc:creator>makouda</dc:creator><description>&lt;p&gt;I do loooooooooooooooooooooooooooooose 4 bytes :D , thanks for your answer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send more than 255 bytes by spi, nrf52</title><link>https://devzone.nordicsemi.com/thread/63422?ContentTypeID=1</link><pubDate>Wed, 21 Sep 2016 13:14:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04287177-0c55-47bc-9e43-284835ec78af</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;No there isn&amp;#39;t a way to send more than 255 bytes in one single transfer, you need to do multiple transfers right after each other without toggling the chip select line.&lt;/p&gt;
&lt;p&gt;And you don&amp;#39;t &amp;#39;loose&amp;#39; 4 bytes, you &amp;#39;lose&amp;#39; 4 bytes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>