<?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>nrf5340 keeping flash sectors between flash burns</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96862/nrf5340-keeping-flash-sectors-between-flash-burns</link><description>Hello! 
 In our application the last two sectors of the APP core flash are used to store non-volatile config information (from 0xFE000, 2x4kB). I&amp;#39;ve created the appropriate partitioning for Zephyr, can access the partitions from FW, no problem. However</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 26 Feb 2023 22:45:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96862/nrf5340-keeping-flash-sectors-between-flash-burns" /><item><title>RE: nrf5340 keeping flash sectors between flash burns</title><link>https://devzone.nordicsemi.com/thread/412120?ContentTypeID=1</link><pubDate>Sun, 26 Feb 2023 22:45:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c983d89-45a6-4cb9-b605-fbd0bd678c65</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi Tamas,&lt;/p&gt;
&lt;p&gt;I wasn&amp;#39;t aware of the difference in flashing times between JLinkExe and nrfjprog! Thanks for sharing, appreciated.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 keeping flash sectors between flash burns</title><link>https://devzone.nordicsemi.com/thread/411295?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2023 09:55:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a812ac3b-aeb3-48b2-97b5-56842edcea95</guid><dc:creator>Tamas Selmeci</dc:creator><description>&lt;p&gt;Hello Raoul!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried both versions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Segger JLinkExe version 7.86 can really burn the flash, so the sensitive last two flash sectors can be preserved;&lt;/li&gt;
&lt;li&gt;nrfjprog with --sectorerase instead of --chiperase also does the trick, another useful solution;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;#39;m just remarking that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;nrfjprog with --sectorerase is much slower than with --chiperase;&lt;/li&gt;
&lt;li&gt;JLinkExe burns the new FW image much faster than nrfjprog (in my case 8s vs. 12s);&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 keeping flash sectors between flash burns</title><link>https://devzone.nordicsemi.com/thread/411169?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 15:36:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:014f6761-fab2-4ce0-b869-129a85ce79fe</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi Tamas,&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;--sectorerase&lt;/code&gt; option should do what you need. It will only erase the flash ranges targeted by the hex file you are programming:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog.exe --program merged.hex --sectorerase&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Just pay attention to the following:&lt;/p&gt;
&lt;p&gt;1. Make sure your persistent data is stored within 4kb pages that are not targeted by the hex file you&amp;#39;re flashing. Erasing happens on a page by page basis.&lt;/p&gt;
&lt;p&gt;2. Ensure that you&amp;#39;re not enabling APProtect during development as it will lock down the device and require a &amp;quot;recover&amp;quot;, erasing the entire flash.&lt;/p&gt;
&lt;p&gt;This case discusses a similar use case to your, you might find it useful: &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/83316/please-clarify-explain-use-of---sectorerase-with-nrfjprog"&gt;Please clarify/explain use of --sectorerase with nrfjprog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you want to use jlink.exe / J-Link Commander, it seems that it &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52596/jlinkexe-equivalent-of-nrfjprog---sectorerase"&gt;defaults to &amp;quot;sectorerase&amp;quot; behavior&lt;/a&gt;, but I see there have been issues with this in previous versions: &lt;a href="https://forum.segger.com/index.php/Thread/8706-SOLVED-Use-J-Link-commander-to-flash-a-file-to-area-that-is-not-erased/"&gt;https://forum.segger.com/index.php/Thread/8706-SOLVED-Use-J-Link-commander-to-flash-a-file-to-area-that-is-not-erased/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>