<?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>NVS is erased after OTA</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121041/nvs-is-erased-after-ota</link><description>We have a product which is based on nrf52840 and nrf connect sdk 2.8.0 
 After OTA sometimes, I find that the NVS is erased, which could lead to some issues on client side. 
 Here is the content of pm_static file 
 
 and on the overlay file we have 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Apr 2025 19:08:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121041/nvs-is-erased-after-ota" /><item><title>RE: NVS is erased after OTA</title><link>https://devzone.nordicsemi.com/thread/533640?ContentTypeID=1</link><pubDate>Wed, 30 Apr 2025 19:08:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42b96a80-e7d2-4abd-b2fe-de82c0ffcb90</guid><dc:creator>MOHAMED AHMED ALI MAHMOUD ELSABAGH</dc:creator><description>&lt;p&gt;I found the issue was in my nvs_driver, the sector size, count and offset were not set correctly to match values in pm_static.yml, once those values were set correctly issue was resolved&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVS is erased after OTA</title><link>https://devzone.nordicsemi.com/thread/533373?ContentTypeID=1</link><pubDate>Tue, 29 Apr 2025 11:13:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36b764de-d53a-4d99-a7d2-fc532a8d7c36</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The storage partition can become erased if you have both&amp;nbsp;CONFIG_MCUMGR_GRP_ZBASIC_STORAGE_ERASE and&amp;nbsp;CONFIG_MCUMGR_GRP_ZBASIC enabled and if the mcumgr client issues the settings erase command as part of the DFU process. But I see&amp;nbsp;CONFIG_MCUMGR_GRP_ZBASIC is disabled in the configuration I posted, so I assume that is not the issue here. Can you inspect the storage partition after the DFU to see if the partition was erased or overwritten with FW data?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVS is erased after OTA</title><link>https://devzone.nordicsemi.com/thread/533360?ContentTypeID=1</link><pubDate>Tue, 29 Apr 2025 10:29:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15006e98-3810-4855-9f08-8a8450594478</guid><dc:creator>MOHAMED AHMED ALI MAHMOUD ELSABAGH</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;flash0 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x000000000 0x0000C000&amp;gt;;
		};
		boot_pad_partition: partition@c000 {
			label = &amp;quot;mcuboot_pad&amp;quot;;
			reg = &amp;lt;0x0000C000 0x0000200&amp;gt;;
		};
		slot0_partition: partition@c200 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0000C200 0x00078E00&amp;gt;;
		};
		slot1_partition: partition@85000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x00085000 0x00079000&amp;gt;;
		};

		storage_partition: partition@fe000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x000FE000 0x00002000&amp;gt;;
		};
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I updated the DTS overlay file, but still have the same issue&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVS is erased after OTA</title><link>https://devzone.nordicsemi.com/thread/533163?ContentTypeID=1</link><pubDate>Mon, 28 Apr 2025 11:22:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71500f2f-c3dc-46f2-81d5-c5b8a62d5afe</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Your pm_static and DTS overlay disagree on the storage patition layout. pm_static says its at 0xFE000 and 0x2000 bytes while the overlay has it at 0xF8000 with 0x8000 bytes. &lt;/p&gt;
&lt;p&gt;They need to match, otherwise the bootloader will overwrite your settings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>