<?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>Changing max i2c transfer byte size (Zephyr + nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108731/changing-max-i2c-transfer-byte-size-zephyr-nrf-connect-sdk</link><description>Hi there, 
 
 I am running nRF Connect SDK 2.5.2 using the nrfx i2c TWI driver with Zephyr. 
 
 I have a sensor device over i2c that I am communicating with. This device’s driver needs to send 32k data chunks over i2c. Since the data needing to be sent</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Feb 2024 00:19:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108731/changing-max-i2c-transfer-byte-size-zephyr-nrf-connect-sdk" /><item><title>RE: Changing max i2c transfer byte size (Zephyr + nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/thread/471435?ContentTypeID=1</link><pubDate>Thu, 29 Feb 2024 00:19:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ae26346-c976-454c-8010-8e15a0c7526f</guid><dc:creator>krisburch</dc:creator><description>&lt;p&gt;My mistake! Of course, was my error; range 0-65535. I assumed the .dts field &lt;span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;zephyr,concat-buf-size/zephyr,flash-buf-max-size&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&amp;quot;size&amp;quot; was a size, but its more of a &amp;quot;max value&amp;quot;.&lt;/p&gt;
&lt;p&gt;Great reference for the max supported link, thank you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Large transfers (~32k) are working for me now, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing max i2c transfer byte size (Zephyr + nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/thread/471353?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2024 14:25:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91cef962-a349-405a-9e05-76172b154b2a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Why do the device tree changes (64k) only allow the buffer size to go to 2k? See devicetree screenshot:[/quote]
&lt;p&gt;A uint16_t can&amp;#39;t hold the number 65536, it can only hold numbers from 0 to 65535. Can you check if reducing it by 1 makes any difference? If this does not work, please check that the overlay is actually being applied to the build (you can check the generated devicetree in build/zephyr/zephyr.dts).&lt;/p&gt;
[quote user=""]Is the true max size 64k? I have seen other places on the Nordic forums saying it was anything from 255 Bytes to 64kB?[/quote]
&lt;p&gt;The TWIM HW peripheral in nRF52840 has a 16-bit wide MAXCNT register, which means it can support up to 65535 bytes in each transfer. The size of the MAXCNT register differs between chip variant and peripheral, you can see an overview on &lt;a href="https://infocenter.nordicsemi.com/topic/struct_nrf52/struct/nrf52.html?cp=5"&gt;this page&lt;/a&gt;.&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></channel></rss>