<?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>DFU data not being written to external flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123847/dfu-data-not-being-written-to-external-flash</link><description>Description: We are working with nRF54L15 connected to an external flash memory MX25R64 . Our setup uses MCUboot with a secondary partition located on the external flash. 
 For firmware updates we are using the dfu_target library. The implementation logic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Aug 2025 10:13:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123847/dfu-data-not-being-written-to-external-flash" /><item><title>RE: DFU data not being written to external flash</title><link>https://devzone.nordicsemi.com/thread/547058?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2025 10:13:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91c61c42-8f4d-4e87-ab8b-09db87c1beb6</guid><dc:creator>Ivenhor</dc:creator><description>&lt;p&gt;Thanks that helped!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU data not being written to external flash</title><link>https://devzone.nordicsemi.com/thread/546878?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2025 10:17:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26cf3a08-22eb-4412-8698-d7b2687508be</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks. Yes, I was able to reproduce. The problem occurs when the chip enters low power mode between transactions. Your sample also worked when I added&amp;nbsp;NRF_POWER-&amp;gt;TASKS_CONSTLAT=1; to the beginning of main().&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/pastedimage1756289532184v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU data not being written to external flash</title><link>https://devzone.nordicsemi.com/thread/546703?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2025 06:55:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8cb649d-adba-4109-9d01-9e1ee3dfceff</guid><dc:creator>Ivenhor</dc:creator><description>&lt;p&gt;Yes, the problem reproduces on the devkit. I prepared an example based on our configuration.&lt;/p&gt;
&lt;p&gt;So you can try it yourself.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Ivenhor/dfu_target_flash_fail"&gt;repository&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU data not being written to external flash</title><link>https://devzone.nordicsemi.com/thread/546625?ContentTypeID=1</link><pubDate>Mon, 25 Aug 2025 12:25:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6e60dd7-f543-41e3-a609-ab5871319403</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This seems very strange, and I haven’t been able to find any similar reports of it. Are you able to test the same code on a nRF54L15 DK to see if you get the same result?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU data not being written to external flash</title><link>https://devzone.nordicsemi.com/thread/546441?ContentTypeID=1</link><pubDate>Fri, 22 Aug 2025 10:23:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e014324f-f0a6-4909-80b3-a547366f8bf5</guid><dc:creator>Ivenhor</dc:creator><description>&lt;p data-start="124" data-end="135"&gt;Hi Vidar,&lt;/p&gt;
&lt;p data-start="137" data-end="207"&gt;Thanks for the reply.&amp;nbsp;Yes, the logs are enabled. No errors occur.&amp;nbsp; Here&amp;rsquo;s some additional context from our testing:&lt;/p&gt;
&lt;ul data-start="209" data-end="764"&gt;
&lt;li data-start="209" data-end="315"&gt;
&lt;p data-start="211" data-end="315"&gt;We are writing &lt;strong data-start="226" data-end="241"&gt;4 KB chunks&lt;/strong&gt; to the external MX25R64 flash (secondary partition managed by MCUBOOT).&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="316" data-end="489"&gt;
&lt;p data-start="318" data-end="489"&gt;Flash dumps using &lt;strong data-start="336" data-end="347"&gt;nrfutil&lt;/strong&gt; show that chunks are only partially written when not debugging: sometimes only the beginning, middle, or end of a chunk is actually stored.&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="490" data-end="591"&gt;
&lt;p data-start="492" data-end="591"&gt;&lt;strong data-start="492" data-end="505"&gt;No errors&lt;/strong&gt; are reported by &lt;code data-start="522" data-end="550"&gt;dfu_target_mcuboot_write()&lt;/code&gt;, and all Zephyr logging calls succeed.&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="592" data-end="764"&gt;
&lt;p data-start="594" data-end="764"&gt;When we run the DFU logic through a &lt;strong data-start="630" data-end="644"&gt;work queue&lt;/strong&gt; instead of a separate thread, the writes succeed &lt;strong data-start="694" data-end="755"&gt;only if we add logging calls immediately before the write&lt;/strong&gt;, e.g.:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;for (int i = 0; i &amp;lt; 50; i++) {
    LOG_INF(&amp;quot;Dummy log&amp;quot;);
}
err = dfu_target_mcuboot_write(data-&amp;gt;rx_chunk_buf, data-&amp;gt;len);
&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="896" data-end="1005"&gt;We suggests a &lt;strong data-start="912" data-end="947"&gt;timing or synchronization issue&lt;/strong&gt;. Logging seems to &amp;ldquo;help&amp;rdquo; the writes complete correctly. With this workaround, we were able to upload a full firmware image. We also observed an issue with the &lt;strong data-start="1116" data-end="1130"&gt;image swap&lt;/strong&gt;: the swap succeeds &lt;strong data-start="1150" data-end="1173"&gt;only when debugging&lt;/strong&gt; (the magic number is read correctly), otherwise the swap may fail.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU data not being written to external flash</title><link>https://devzone.nordicsemi.com/thread/546338?ContentTypeID=1</link><pubDate>Thu, 21 Aug 2025 12:14:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fe871fe-5f0f-45eb-b7fe-76027a739714</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t think of any explanation for why it works during an active debug session, but when not debugging, the app runs normally without errors but skips all writes to external flash. Is UART logging available on this board so you can check what happens when not in debug mode?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>