<?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 configuration (zephyr,concat-buf-size = &amp;lt;65536&amp;gt; and zephyr,flash-buf-max-size = &amp;lt;65536&amp;gt;) is throwing stack overflow error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113768/i2c-configuration-zephyr-concat-buf-size-65536-and-zephyr-flash-buf-max-size-65536-is-throwing-stack-overflow-error</link><description>HI Nordic Team, 
 I am developing a firmware to interface CH101 sensor, which has a firmware loading of 2048 bytes of data over I2C. 
 I declared buffer size as below in device tree and in program I have given 128 bytes transfer in single I2C write call</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Aug 2024 08:56:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113768/i2c-configuration-zephyr-concat-buf-size-65536-and-zephyr-flash-buf-max-size-65536-is-throwing-stack-overflow-error" /><item><title>RE: I2C configuration (zephyr,concat-buf-size = &lt;65536&gt; and zephyr,flash-buf-max-size = &lt;65536&gt;) is throwing stack overflow error</title><link>https://devzone.nordicsemi.com/thread/498217?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 08:56:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:374e67ae-5260-4467-ad8a-5c42f01ec57b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try probing the I2C pins and see how a working scenario vs. a non-working scenario behaves.&lt;/p&gt;
&lt;p&gt;The first screenshot indicates a reset or a reboot? If yes, is this a fault condition that occurs? It is hard to see when the debug information available is limited.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C configuration (zephyr,concat-buf-size = &lt;65536&gt; and zephyr,flash-buf-max-size = &lt;65536&gt;) is throwing stack overflow error</title><link>https://devzone.nordicsemi.com/thread/497953?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 08:01:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc81e39d-6faa-49f1-a16c-b8232524d17d</guid><dc:creator>PassionPioneer</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is there any update on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C configuration (zephyr,concat-buf-size = &lt;65536&gt; and zephyr,flash-buf-max-size = &lt;65536&gt;) is throwing stack overflow error</title><link>https://devzone.nordicsemi.com/thread/497761?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2024 09:39:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56ca822d-cc14-4a0b-8ccc-e61fa09bdb5a</guid><dc:creator>PassionPioneer</dc:creator><description>&lt;p&gt;Log with buffer size 65535/2048&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1723455492507v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Log when buffer size is 1024, firmware write is OK&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1723455542825v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C configuration (zephyr,concat-buf-size = &lt;65536&gt; and zephyr,flash-buf-max-size = &lt;65536&gt;) is throwing stack overflow error</title><link>https://devzone.nordicsemi.com/thread/497759?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2024 09:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6de0da7-351a-41f4-a60b-aecebeefb2e1</guid><dc:creator>PassionPioneer</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tried 2048, it didn&amp;#39;t work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am working on ch101 ultrasonic sensor, when I use 2048 the firmware is getting stuck and giving any reasonable log.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C configuration (zephyr,concat-buf-size = &lt;65536&gt; and zephyr,flash-buf-max-size = &lt;65536&gt;) is throwing stack overflow error</title><link>https://devzone.nordicsemi.com/thread/497756?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2024 09:27:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bcf10ef-6e4a-4eae-8dde-907ea1977f0c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you share your log output?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there any reason why you are setting up 64kB instead of your max message size (ie. 2048 bytes) ?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C configuration (zephyr,concat-buf-size = &lt;65536&gt; and zephyr,flash-buf-max-size = &lt;65536&gt;) is throwing stack overflow error</title><link>https://devzone.nordicsemi.com/thread/497690?ContentTypeID=1</link><pubDate>Sat, 10 Aug 2024 06:26:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c216ac49-15fa-4b55-9b59-330860b0c95a</guid><dc:creator>PassionPioneer</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is there any update?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C configuration (zephyr,concat-buf-size = &lt;65536&gt; and zephyr,flash-buf-max-size = &lt;65536&gt;) is throwing stack overflow error</title><link>https://devzone.nordicsemi.com/thread/497646?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 13:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd6132b5-0223-4910-be11-0fca6d9a9848</guid><dc:creator>PassionPioneer</dc:creator><description>&lt;p&gt;Okay, I tried 65535, there is no reset on board however the I2C call is not performing.&lt;/p&gt;
&lt;p&gt;I tried 1024 and 2048 bytes transfer in single call.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C configuration (zephyr,concat-buf-size = &lt;65536&gt; and zephyr,flash-buf-max-size = &lt;65536&gt;) is throwing stack overflow error</title><link>https://devzone.nordicsemi.com/thread/497615?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 11:49:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed7a94c3-729a-43d3-9cfe-e2df5c0ce5f8</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]I increased the buffer size to 65536 as mentioned below in device tree:[/quote]
&lt;p&gt;The TWIM EasyDMA is 16 bit, meaning 65535 is the max size.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Based on the error message, it seems that you&amp;#39;ve set it to 65536, which overflows into 0 for a 16 bit value.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C configuration (zephyr,concat-buf-size = &lt;65536&gt; and zephyr,flash-buf-max-size = &lt;65536&gt;) is throwing stack overflow error</title><link>https://devzone.nordicsemi.com/thread/497563?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 07:25:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16ba036b-60f7-41ff-828a-6300a7b66d6e</guid><dc:creator>PassionPioneer</dc:creator><description>&lt;p&gt;HI&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is there any update on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>