<?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>save and update flash data on reboot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49419/save-and-update-flash-data-on-reboot</link><description>What is the max amount of data that can be saved in records in fds? 
 When we do a dfu, is the data conserved or not? 
 How to vary the size of the records if possible? 
 I am trying to store 6kb data of array of structs data.Previously i used a flashwrite</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Jul 2019 16:12:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49419/save-and-update-flash-data-on-reboot" /><item><title>RE: save and update flash data on reboot</title><link>https://devzone.nordicsemi.com/thread/198785?ContentTypeID=1</link><pubDate>Tue, 16 Jul 2019 16:12:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ad60d98-ea89-40d2-9232-dca7c9580eb3</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you have any questions regarding NFC and the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fnfc_writable_ndef_msg.html"&gt;Writable NDEF Message Example&lt;/a&gt;, then I suggest that you open a new thread for that, with a title reflecting the question. It has little to do with &amp;quot;save and update flash data on reboot&amp;quot;. The &amp;quot;writing&amp;quot; in that example is communicating over NFC. It is not about writing to Flash.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: save and update flash data on reboot</title><link>https://devzone.nordicsemi.com/thread/196874?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 14:23:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d92c78c-f035-47ac-a7c3-6e6692d3fc9e</guid><dc:creator>oyomj343</dc:creator><description>&lt;p&gt;Also can we use &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.0.0%2Flib_fds.html&amp;amp;cp=4_0_0_3_31"&gt;writable_ndef_msg&lt;/a&gt;&amp;nbsp;example in our code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: save and update flash data on reboot</title><link>https://devzone.nordicsemi.com/thread/196871?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 14:06:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3254b1a3-be30-4eb2-a74a-197c11b0f304</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]What is the max amount of data that can be saved in records in fds?[/quote]
&lt;p&gt;The data size of one FDS record must be less than the size of a virtual FDS flash page minus the 8 byte FDS flash page header and the 12 byte record header. For more information, see &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Flib_fds_format.html&amp;amp;anchor=lib_fds_format_max_length"&gt;Maximum Length&lt;/a&gt; in the FDS documentation.&lt;/p&gt;
[quote user=""]When we do a dfu, is the data conserved or not?[/quote]
&lt;p&gt;During DFU, application data is conserved according to settings in the bootloader. This goes for both FDS, fstorage, and otherwise stored application data within the flash area intended for the application. For more information, see &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Flib_bootloader_dfu_banks.html&amp;amp;anchor=lib_bootloader_dfu_appdata"&gt;Preserving application data&lt;/a&gt; in the DFU bootloader documentation.&lt;/p&gt;
[quote user=""]How to vary the size of the records if possible?[/quote]
&lt;p&gt;In FDS, records have the size you decide to give them on creation. Each record has a size that is independent of other records.&lt;/p&gt;
[quote user=""]I am trying to store 6kb data of&amp;nbsp; array of structs data.Previously i used a flashwrite to save, but it didn&amp;#39;t help.What is the way to save such a type of data in flash memory[/quote]
&lt;p&gt;For that kind of storage &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Flib_fstorage.html"&gt;fstorage&lt;/a&gt; is probably a better choice, as it gives you direct access to addressable regions of flash. Note also that 6kb is a relatively large amount of data, and that flash pages can only be erased one flash page at the time. Data can be written in smaller chunks down to four byte chunks (one word), but in order to rewrite a word you must erase the whole flash page.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>