<?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>Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112319/default-storage-of-persistent-info-for-openthread</link><description>Hello, I wanted to understand what is the default storage place in the internal flash memory region of persistent info for OpenThread. In the previous SDK (Thread and Zigbee) it was clearly mentioned the default memory region as shown below, (reference</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Jul 2024 07:37:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112319/default-storage-of-persistent-info-for-openthread" /><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/491487?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 07:37:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fbf8419-a40e-4c60-96e5-b4026c497cba</guid><dc:creator>tush3094</dc:creator><description>&lt;p&gt;Yes, this clarifies my doubt. Thank you so much for a&amp;nbsp;nice explanation.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/491477?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 06:50:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c63f732-1a13-4cbc-9c69-1ab6a83fddfb</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Aha,&lt;/p&gt;
[quote user="tush3094"]Because settings_storage address is not something which I declare in the partition manager .yml file. This address 0XF7000 is randomly chosen.[/quote]
&lt;p&gt;Given that you define that you have a storage partition or that you use a protocol that requires a storage partition and automatically selects/includes this section from configurations, it will be included by the partition manager automatically. But it&amp;#39;s placement will change if you only statically define your application slot partitions and not your settings partitions.&lt;/p&gt;
&lt;p&gt;I would recommend that you define all the partitions you need, including settings_storage statically so that you ensure robustness when performing DFU at a later point in time.&lt;/p&gt;
[quote user="tush3094"]My only concern is if in future the firmware size increases and reaches this point will these stored settings be deleted or automatically handled by the partition manager?[/quote]
&lt;p&gt;I understand now what you meant by this question. The short answer is that you should always statically declare all of your partitions with enough room to fit any future firmware updates that you have defined in your products scope/life time&lt;/p&gt;
&lt;p&gt;The slightly longer explanation is:&lt;/p&gt;
&lt;p&gt;It is also better to allocate a larger mcuboot_primary_application and mcuboot_secondary_application partitions than your applications currently are to ensure robustness w.r.t increasing the application size in the future than it is to rescope your partitions after you&amp;#39;ve entered production. Of course there are situations where you&amp;nbsp;&lt;em&gt;must&lt;/em&gt; update a device since mandatory updates must be done that does not fit your scope, but you should always&amp;nbsp;&lt;em&gt;try&lt;/em&gt; to plan ahead of those things. One of the things you can do to plan for the unexpected is to have larger application sizes than your applications actual size.&lt;/p&gt;
&lt;p&gt;If you ever intend to update your application size by updating the static partitioning map and&amp;nbsp;&lt;em&gt;only&lt;/em&gt; changing the application slot sizes (&lt;span&gt;mcuboot_primary_application and mcuboot_secondary_application) you will have issues with finding and reading the other partitions in your device. This is also the reason for why we recommend that you always define everything statically before going into production.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Firmware updates are typically meant to patch, fix, and add things that are already predefined to a products scope, and it is not really recommended to rescope the product and update it through DFU unless you&amp;#39;ve already planned ahead for this, i.e preallocated sufficient enough room for said updates.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Let&amp;#39;s say for instance if you wish to add a new feature which will translate to an increase of firmware by 30 kB. This will require 60kB since you need to increase both of the application slot sizes with 30kB. To do this you will have to update your static partitioning, but if you don&amp;#39;t also update your MCUboot second stage bootloader to be aware of the new partitioning scheme, then the update won&amp;#39;t go through since MCUboot still believes that the primary and secondary app starts and ends at the same addresses.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here&amp;#39;s a quick sketch I made to somewhat illustrate this specific point&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1719816042750v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I.e to summarize: Scope your partition sizes to account for future firmware updates if you believe you will add new features in the future. If you don&amp;#39;t have enough flash on your internal flash to do this, then you have two options: Limit your scope/reduce the features or add an external flash and place the mcuboot secondary storage + other storage that does not require any special security on the external flash.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Let me know if this answers your question&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;br /&gt;Andreas&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/491372?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2024 13:49:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:749a5569-d404-4cae-953d-4674701ab470</guid><dc:creator>tush3094</dc:creator><description>&lt;p&gt;Sorry, I was not clear. I meant if the firmware application size increases and reaches this point. After a firmware update would it be restored again? Because settings_storage address is not something which I declare in the partition manager .yml file. This address 0XF7000 is randomly chosen.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/491368?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2024 13:44:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91191d8d-b91a-43ea-9021-419e82e830b7</guid><dc:creator>AHaug</dc:creator><description>[quote user="tush3094"]My only concern is if in future the firmware size increases and reaches this point will these stored settings be deleted or automatically handled by the partition manager?[/quote]
&lt;p&gt;I assume by this that you mean in case you have to store more data in your settings_storage partition than the declared size, and not if the application firmware size itself increases in the future (correct me if I&amp;#39;m wrong):&lt;/p&gt;
&lt;p&gt;If this is the case then he partition manager uses the settings_storage subsystem which in turn should have its own garbage-collection procedure, mentioned&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/settings/index.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/settings/index.html&lt;/a&gt;, as described &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/settings/index.html#garbage-collection"&gt;here&lt;/a&gt;:&amp;nbsp;&lt;em&gt;&amp;quot;When storage becomes full (FCB) or consumes too much space (file), the backend removes non-recent key-value pairs records and unnecessary key-delete records.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Let me know if this answers your question&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: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/491357?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2024 13:25:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2166a0b-8832-4257-a707-43d4c554aa4a</guid><dc:creator>tush3094</dc:creator><description>&lt;p&gt;Hello Andreas,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for looking into it. In the last 2 days I tried some more stuff and made some changes into the partition manager .yml file and already reached this point.&lt;br /&gt;&lt;br /&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/pastedimage1719580982905v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As per the info OpenThread data is stored in settings_storage partition which is at 0xF7000 after my changes. This is all good.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;My only concern is if in future the firmware size increases and reaches this point will these stored settings be deleted or automatically handled by the partition manager?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Tushar&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/491337?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2024 12:51:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:691b387f-6575-497b-86f3-394e0f5c10bc</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;From what we can see it looks like you&amp;#39;re the Partition Manager, and when you are using this the DTS partitioning is no longer used.&lt;/p&gt;
&lt;p&gt;Instead you should use &lt;em&gt;&amp;quot;west build -t partition_manager_report&amp;quot; &lt;/em&gt;to see your new partitioning, and try to read from that area instead.&lt;/p&gt;
&lt;p&gt;See&amp;nbsp;&lt;a title="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/" href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/" rel="noopener noreferrer" target="_blank"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/&lt;/a&gt;&lt;span&gt;&lt;/span&gt; for some background on this&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/490652?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2024 13:00:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56a3b2dd-712b-498f-b8ed-0d0c813b1e67</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Maria is currently on vacation so I will be monitoring this case meanwhile. I will need some time to sync up with the information in this case, but I will get back to you later this week.&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: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/490352?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 14:20:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f8f7bec-31c4-4ce2-a3b3-4b2fa6b6fc37</guid><dc:creator>tush3094</dc:creator><description>&lt;p&gt;Some more information regarding the above issue. OpenThread data is stored correctly on our firmware when partition manager and bootloader are not used. Just the firmware is built and flashed.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So basically this issue comes up when we built the firmware as a whole with application and MCU boot.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Is there any specific change required here that needs to be done with partition manager enabled?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/490023?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 15:11:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90a16ea1-8e75-4a55-b543-39224c5d525e</guid><dc:creator>tush3094</dc:creator><description>&lt;p&gt;So I tested with the thread CLI example for nrf52840,&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/pastedimage1718982617483v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Here the openthread data is stored correctly&lt;br /&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/pastedimage1718982656649v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I am not sure what I am doing wrong in my build&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/489985?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 13:26:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81ba09b0-4f79-42d9-9099-191f57fc4eae</guid><dc:creator>tush3094</dc:creator><description>&lt;p&gt;I read it out via the debugger (entire flash)&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/pastedimage1718976211837v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I consider this as the openthread data as I can see the panid (Openthread-e193) which is same as my dataset of the mesh.&lt;br /&gt;&lt;br /&gt;I am using my own code. How can I include this settings service in my application?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I have not tried to read out the OpenThread data from NCS sample. I can try it and get back to you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/489980?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 13:16:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc2bc73b-14c3-46c0-9c30-cf1f415745e3</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;How and where do you read out the 0xF3000 address for the OpenThread data?&lt;/p&gt;
&lt;p&gt;Are you using an NCS sample or your own code? For the Thread samples in NCS, the settings service is included by default. Do you see the same when reading out the address for the OpenThread data for an NCS sample?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/489965?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 12:36:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:286f3c13-0f75-4a14-8bdd-4f047452c5c5</guid><dc:creator>tush3094</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;Hello Maria,&lt;br /&gt;&lt;br /&gt;Thank you for your quick reply. I have add these extra configs in my proj.conf&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_NVS&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SETTINGS&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SETTINGS_NVS&lt;/span&gt;&lt;span&gt;=y&lt;br /&gt;&lt;br /&gt;Also I have edited my .dts file to have the label &amp;quot;storage&amp;quot; for the storage partition with start address @FA000.&lt;br /&gt;&lt;br /&gt;Even though this is set the openthread data is still stored at 0xF3000.&lt;br /&gt;&lt;br /&gt;Is the openthread handling the storage by itself or we need to over ride some functions of openthread?&amp;nbsp;&lt;br /&gt;Currently, I am just not able to store the openthread data at this address.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default storage of persistent info for OpenThread</title><link>https://devzone.nordicsemi.com/thread/489918?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 10:22:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf2956a8-2ce8-45eb-9b4c-dcf2be8bbf34</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The defaultt storage location for the OpenThread network data in NCS is in settings storage which again is in NVS. It is the settings subsystem which handles storing in NVS when using Thread in NCS. See the documentation for &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/thread/configuring.html"&gt;Configuring Thread in NCS&lt;/a&gt; for general information on Thread in NCS, the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/settings/index.html"&gt;Settings service&lt;/a&gt; documentation, and &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/storage/nvs/nvs.html"&gt;NVS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>