<?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 - using NVS and LittleFS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122518/nrf5340---using-nvs-and-littlefs</link><description>Hi 
 I can run the sample application for NVS, on the nF5340 DK (SDK 2.9.0) 
 I can run the sample application for LittleFS, also on the nRF5340 DK 
 Now I would like to see if I can use both, and share the flash partition - maybe 50/50. 
 Is this possible</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Jul 2025 19:11:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122518/nrf5340---using-nvs-and-littlefs" /><item><title>RE: nRF5340 - using NVS and LittleFS</title><link>https://devzone.nordicsemi.com/thread/541086?ContentTypeID=1</link><pubDate>Tue, 01 Jul 2025 19:11:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:301bff35-cee4-4695-be6c-ebb6f8e1c3c8</guid><dc:creator>garrettb</dc:creator><description>&lt;p&gt;thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - using NVS and LittleFS</title><link>https://devzone.nordicsemi.com/thread/540986?ContentTypeID=1</link><pubDate>Tue, 01 Jul 2025 08:21:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87a70b72-3b43-4899-be45-d7235779142f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;Yes, Bluetooth stack uses the settings_storage to store data (by default). I believe it&amp;#39;s about 80 bytes per bonding. Please be noted that there is at least one page needed for garbage collection.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - using NVS and LittleFS</title><link>https://devzone.nordicsemi.com/thread/540932?ContentTypeID=1</link><pubDate>Mon, 30 Jun 2025 19:04:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ac26443-11c3-45c9-a161-08bd5924023a</guid><dc:creator>garrettb</dc:creator><description>&lt;p&gt;I have it working now.&lt;/p&gt;
&lt;p&gt;I just have a basic version working which uses the code from the NVSA and the LittleFS sample applications.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My prj.conf file includes these settings:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_SETTINGS=y
#CONFIG_REBOOT=y


CONFIG_NVS=y
CONFIG_NVS_LOG_LEVEL_DBG=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

CONFIG_MAIN_STACK_SIZE=4096
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My pm_static.yml:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;user_littlefs_storage:
address: 0xfc000
size: 0x2000
end_address: 0xfe000
placement:
before:
- end
region: flash_primary
user_nvs_storage:
address: 0xfe000
size: 0x2000
end_address: 0x100000
placement:
before:
- end
region: flash_primary&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So now I can use both, it seems.&lt;/p&gt;
&lt;p&gt;One thing I don&amp;#39;t understand.&lt;/p&gt;
&lt;p&gt;If I am correct, this storage area is also used by Bluetooth, for storig pairing/bonding and other information.&lt;br /&gt;Is this correct?&lt;br /&gt;If so, how much of this storage area is it safe to re-assign to either NVS or LittleFS?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - using NVS and LittleFS</title><link>https://devzone.nordicsemi.com/thread/540580?ContentTypeID=1</link><pubDate>Thu, 26 Jun 2025 11:51:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffbc76e3-a62b-4046-8a03-ac798ba72624</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;Please try to recover the network core by using:&amp;nbsp;&lt;br /&gt;nrfjprog --recover --coprocessor CP_NETWORK&lt;/p&gt;
&lt;p&gt;You may want to recover the application core as well&lt;br /&gt;nrfjprog --recover --coprocessor CP_APPLICATION&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Which error do you have when you enable both NVS and LittleFS&amp;nbsp; ?&amp;nbsp;&lt;br /&gt;Have you defined a parttition for littlefs ? You can make a pm_static.yml file (copy from a&amp;nbsp;partitions.yml in build folder in littlefs sample for example, and modify it as you wish) to force a partition configuration. You can find the use of pm_static.yml in&amp;nbsp;\nrf\applications\nrf_desktop\configuration\nrf52kbd_nrf52832 for example.&amp;nbsp;&lt;br /&gt;It should be in the project folder.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - using NVS and LittleFS</title><link>https://devzone.nordicsemi.com/thread/540525?ContentTypeID=1</link><pubDate>Wed, 25 Jun 2025 21:48:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06ae0a6b-f3c0-4376-b9c4-efae8e17be86</guid><dc:creator>garrettb</dc:creator><description>&lt;p&gt;Also, along the way I now seem to have &amp;#39;bricked&amp;#39; the nRF5340 DK - i.e. corrupted the network core? How do I reprogram this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>