<?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>i2c message max buffer size</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54308/i2c-message-max-buffer-size</link><description>Hello, 
 I am using the nrf9160DK and I am implementing on zephyr. 
 For my application I need to write to an external flash memory through I2C. I need to write one page at a time + CRC bytes. In total I need to write 8210 bytes. 
 However using a logic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Apr 2021 07:42:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54308/i2c-message-max-buffer-size" /><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/303906?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 07:42:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae2c80ea-3399-4e98-b415-c94f15287e3e</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/gaurav-dubey"&gt;Gaurav Dubey&lt;/a&gt;, please open a new ticket with your issue. Please add what version of NCS you are using and what issues you are seeing.&lt;br /&gt;&lt;br /&gt;Thanks!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/303900?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 07:01:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:948382bb-4c26-41d2-af6c-5b7e115b9d05</guid><dc:creator>Gaurav Dubey</dc:creator><description>[quote userid="103267" url="~/f/nordic-q-a/54308/i2c-message-max-buffer-size/303858#303858"]&lt;p&gt;I am trying to write the .msbl file to max32664c interfaced with nrf52840 and having the same issue.&lt;/p&gt;
&lt;p&gt;I am unable to write 8210 bytes in one go and in chunks it throughs an error.&lt;/p&gt;
&lt;p&gt;Have anyone resolved this issue&lt;/p&gt;[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/303858?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 16:44:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d858fc86-446f-4404-9f9b-ccd48f37a0bc</guid><dc:creator>Gaurav Dubey</dc:creator><description>&lt;p&gt;I am trying to write the .msbl file to max32664c interfaced with nrf52840 and having the same issue.&lt;/p&gt;
&lt;p&gt;I am unable to write 8210 bytes in one go and in chunks it throughs an error.&lt;/p&gt;
&lt;p&gt;Have anyone resolved this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/267942?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 06:20:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:961c0969-b810-4f84-9ef0-8ae3fdf5482f</guid><dc:creator>Balamurugan</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We are trying to interface nRF52832 with&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://pdfserv.maximintegrated.com/en/an/user-guide-6806-max32664.pdf"&gt;max32664C&lt;/a&gt;&amp;nbsp;using i2c. While writing&amp;nbsp;&lt;span&gt;8210 bytes, only 18 byes succeeds.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Facing same issue.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you resolved&amp;nbsp;the issue and what is the solution?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/220915?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 15:28:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa4c6b74-3f01-4a5f-8d9f-645cfcccf14a</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;From what I see you will need to divide the data into chunks of let&amp;#39;s say 1000 bytes. You will then need to write each chunk without a stop condition (&lt;a href="https://devzone.nordicsemi.com/support-private/support/239226#permalink=511218"&gt;opposite of what I first wrote&lt;/a&gt;), then on the last chunk, you write stop condition.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/220375?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2019 15:48:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b22a64c8-7154-4609-9f95-f92a70a9de99</guid><dc:creator>Varouzan</dc:creator><description>&lt;p&gt;The device I am trying to interface with is &lt;a href="https://pdfserv.maximintegrated.com/en/an/user-guide-6806-max32664.pdf"&gt;max32664C&lt;/a&gt;. I am trying to flash the application firmware for it.&lt;/p&gt;
&lt;p&gt;I am using zephyr\include\drivers\i2c.h. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/220272?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2019 11:11:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af7c9509-573c-401c-b243-c144125bdffe</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Can you please provide the name of the device you are trying to interface? Or a datasheet? How are you using the I2C? You should use commands found in: zephyr\include\drivers\i2c.h&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/220097?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2019 14:10:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6d53018-3961-48b9-b6d1-7041b54be85f</guid><dc:creator>Varouzan</dc:creator><description>&lt;p&gt;Yes. I have to write the page+ checksum bytes at one transaction, so 8210 bytes at one go.&lt;/p&gt;
&lt;p&gt;What functions am I supposed to use to utilize twim.&amp;nbsp; those at zephyr\ext\hal\nordic\nrfx\drivers\include &lt;strong&gt;nrfx_twim.h? &lt;/strong&gt;those at &lt;strong&gt;zephyr\drivers\i2c&amp;nbsp; i2c_nrfx_twim.c&lt;/strong&gt; (can&amp;#39;t find .h header for those)?&lt;/p&gt;
&lt;p&gt;Looking into nrf9160.h and&amp;nbsp; NRF_TWIM_Type and its&amp;nbsp; member TWIM_TXD_Type&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;typedef struct {
  __IOM uint32_t  PTR;                          /*!&amp;lt; (@ 0x00000000) Data pointer                                               */
  __IOM uint32_t  MAXCNT;                       /*!&amp;lt; (@ 0x00000004) Maximum number of bytes in transmit buffer                 */
  __IM  uint32_t  AMOUNT;                       /*!&amp;lt; (@ 0x00000008) Number of bytes transferred in the last transaction        */
  __IOM uint32_t  LIST;                         /*!&amp;lt; (@ 0x0000000C) EasyDMA list type                                          */
} TWIM_TXD_Type;                         &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;it looks like&amp;nbsp; MAXCNT refers to TXD.MAXCNT?&lt;/p&gt;
&lt;p&gt;So even with TWIM is it possible to send more that 8191 bytes? yes or no? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/220011?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2019 08:57:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0a30b3d-4add-47bc-8d81-7ccd3c5334aa</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;The only I2C sample we have at the moment is&amp;nbsp;the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/sensor/bh1749/README.html#bh1749-ambient-light-sensor-ic"&gt;BH1749: Ambient Light Sensor IC&lt;/a&gt;&amp;nbsp;used on the Thingy:91.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Is there a reason why you can&amp;#39;t divide your write process into smaller chunks i.e.&amp;nbsp;one page at a time with a stop condition after each page?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/219929?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2019 16:13:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af86dd61-48d1-4600-833c-2291bed1dfe8</guid><dc:creator>Varouzan</dc:creator><description>&lt;p&gt;So to work around that, I would have to use EasyDMA? Are there any examples of that or how to use EasyDMA or TWIM instead of &amp;quot;traditional&amp;quot; I2C using zephyr ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c message max buffer size</title><link>https://devzone.nordicsemi.com/thread/219878?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2019 12:01:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72b98f7d-ef4d-44c5-9bef-279d1bbe05e1</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
[quote user=""]Is there a built in max length for i2c transactions? is that 8k bytes? Is there a way around that?&amp;nbsp;[/quote]
&lt;p&gt;The &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf9160/twim.html?cp=2_0_0_5_16_7_38#register.TXD.MAXCNT"&gt;transmit buffer&lt;/a&gt; of the nRF9160 has a maximum value of 0x1FFF or 8191 bytes. Please see &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf9160/twim.html?cp=2_0_0_5_16_2#concept_bg4_swp_xr"&gt;TWI Master Write Sequence&lt;/a&gt; for more information&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>