<?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>Writing Logs to the Flash using mesh example(light switch)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50396/writing-logs-to-the-flash-using-mesh-example-light-switch</link><description>Hi, 
 I want to log the application error data log into the internal flash(1MB) using the mesh example. I found that there are two ways of writing 1)FDS 2)Flash Manager. I want to know which one is better. And can i get some example code?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Aug 2019 13:25:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50396/writing-logs-to-the-flash-using-mesh-example-light-switch" /><item><title>RE: Writing Logs to the Flash using mesh example(light switch)</title><link>https://devzone.nordicsemi.com/thread/202452?ContentTypeID=1</link><pubDate>Mon, 05 Aug 2019 13:25:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:543ec62d-8b8f-4177-8cb0-cc73d2bf5662</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Satwik,&lt;/p&gt;
&lt;p&gt;Please refer to the response of our R&amp;amp;D:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The pool size should be at least 16 bytes larger than the largest packet to fit internal overhead.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Having a pool size that just barely fits the largest entry will cause some performance issues though, so I&amp;#39;d recommend adjusting it to keep it at two times the size of the largest entry.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I would suggest to have the pool size of 2x&lt;span&gt;FLASH_MANAGER_ENTRY_MAX_SIZE + 2x16.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing Logs to the Flash using mesh example(light switch)</title><link>https://devzone.nordicsemi.com/thread/202244?ContentTypeID=1</link><pubDate>Sat, 03 Aug 2019 12:40:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:571b1d6e-6239-4124-9575-af18d3a6ba23</guid><dc:creator>Satwik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have gone through Flash Manager document, but I didn&amp;#39;t find some of the things like:&lt;/p&gt;
&lt;p&gt;1) How the &lt;span&gt;FLASH_MANAGER_ENTRY_MAX_SIZE&amp;nbsp;&lt;/span&gt;and &lt;span&gt;FLASH_MANAGER_POOL_SIZE&amp;nbsp;are&lt;/span&gt;&amp;nbsp;related and if I want to increase&amp;nbsp;&lt;span&gt;FLASH_MANAGER_ENTRY_MAX_SIZE to 512 bytes then what should be the&amp;nbsp;FLASH_MANAGER_POOL_SIZE ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2)&amp;nbsp;FLASH_MANAGER_ENTRY_MAX_SIZE and&amp;nbsp;FLASH_MANAGER_POOL_SIZE&amp;nbsp;should be in multiples&amp;nbsp;of 128? ( like 128,256,384,512,1024)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing Logs to the Flash using mesh example(light switch)</title><link>https://devzone.nordicsemi.com/thread/201563?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2019 12:09:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7b0f82a-f6e7-4468-a012-e31cd79a6591</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;The garbage collection (defragmentation) is executed automatically by the module when there is no more space to update/add new entry to the system. Please have a look &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.2.0/md_doc_libraries_flash_manager.html?cp=5_2_2_0"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The max size of an entry by default is 128.&amp;nbsp;You can increase&amp;nbsp;it by increasing FLASH_MANAGER_ENTRY_MAX_SIZE.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that you would need to increase&amp;nbsp;FLASH_MANAGER_POOL_SIZE as well.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing Logs to the Flash using mesh example(light switch)</title><link>https://devzone.nordicsemi.com/thread/201327?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2019 15:08:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e7e125f-8fb0-406a-9454-b5a74a981137</guid><dc:creator>Satwik</dc:creator><description>&lt;p&gt;Thanks for the reply. What happens when the flash page is filled with the invalid data?&amp;nbsp;I used to do &amp;quot;gc&amp;quot; in FDS, Is there anything similar I need to do to clear the invalid data? And can I increase the entry max size in flash manager ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing Logs to the Flash using mesh example(light switch)</title><link>https://devzone.nordicsemi.com/thread/201322?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2019 14:51:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db4ba474-3614-401d-a082-8c77b8977cdc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;We would suggest to use the Flash Manager module. It&amp;#39;s was made for mesh SDK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For an example of storing application data using flash manager, you can have a look at the enocean example in our SDK.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>