<?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 data lost after MCUBoot bootload</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100006/nvs-data-lost-after-mcuboot-bootload</link><description>Hi, we are using NVS to store settings in flash. Everything works correctly until we bootload a new firmware version, then it looks like MCUBoot erases all our settings. We are using NCS V2.3.0. To test this I made a copy of ncs\v2.3.0\zephyr\samples</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 May 2023 02:07:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100006/nvs-data-lost-after-mcuboot-bootload" /><item><title>RE: NVS data lost after MCUBoot bootload</title><link>https://devzone.nordicsemi.com/thread/428022?ContentTypeID=1</link><pubDate>Tue, 30 May 2023 02:07:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f99fdcd7-6cf0-443e-a802-ed3b8957d66c</guid><dc:creator>hjetschko</dc:creator><description>&lt;p&gt;Hi Andreas&lt;/p&gt;
&lt;p&gt;Thank you for the link. I looked through the source code and made the following changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Copied pm_static.yml from the example in the link you sent into our source code&lt;/li&gt;
&lt;li&gt;Changed:&lt;br /&gt;#define NVS_PARTITION&lt;span&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; storage_partition&lt;br /&gt;to:&lt;br /&gt;#define NVS_PARTITION&lt;span&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; custom_nvs_storage&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It looks like this moves the NVS storage location a bit higher up in flash and out of reach of MCUBoot. All the settings are preserved after a bootload. Thanks again for your help with this.&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;Hubert&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVS data lost after MCUBoot bootload</title><link>https://devzone.nordicsemi.com/thread/427550?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 13:43:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8b858cf-69f7-4113-8e2b-94153a5bc66d</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Initial investigation makes it look like everything is set up correctly and whatever is in the NVS partition should be persistent in between DFU. Unfortunately I will have to investigate the Zephyr sample and your project some more before I can find anything conclusive for you.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In the meanwhile, I have something constructive for you. A colleague of mine has answered a similar case in&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/97525/setting-and-using-nvs-and-bt-settings-with-static-partition-manager/416596"&gt;RE: Setting and using NVS and BT Settings with Static Partition Manager&lt;/a&gt;. Here you will also find a sample in the final reply which should do what you&amp;#39;re aiming to do. Unfortunately it is not a minimal sample, so you will have to do some dissecting to find the differences. The sample is based on the peripheral_hr sample with bootloader, Bluetooth and a custom NVS partition&lt;/p&gt;
&lt;p&gt;Let me know if this other thread solves your issue&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVS data lost after MCUBoot bootload</title><link>https://devzone.nordicsemi.com/thread/427339?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 21:13:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b972ab56-f9f2-42d1-9d44-a2ed61470097</guid><dc:creator>hjetschko</dc:creator><description>&lt;p&gt;Hi Andreas&lt;/p&gt;
&lt;p&gt;Thank you, I appreciate your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVS data lost after MCUBoot bootload</title><link>https://devzone.nordicsemi.com/thread/427234?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 12:37:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67f4e4e9-6790-4954-8180-a3f09e2b5f57</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve picked up your case and will be working on providing you an answer as soon as possible. Hopefully within tomorrow.&lt;/p&gt;
&lt;p&gt;Apologies for the inconvenience&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>