<?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>why app preserved data are lost after DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11843/why-app-preserved-data-are-lost-after-dfu</link><description>I configured the bootloader to preserve one page of data ( I configured #define DFU_APP_DATA_RESERVED 0x400 on the bootloader project 
 I also made the same thing with my project code 
 my userdata are located on the page above the bootlaoder ( 0x0003BC00</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Feb 2016 13:46:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11843/why-app-preserved-data-are-lost-after-dfu" /><item><title>RE: why app preserved data are lost after DFU</title><link>https://devzone.nordicsemi.com/thread/44848?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2016 13:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4382129c-07a0-4248-b537-93e351fa5f92</guid><dc:creator>makouda</dc:creator><description>&lt;p&gt;fine it works finally. i checked the beggining of my app data and set DFU_APP_DATA_RESERVED to there&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: why app preserved data are lost after DFU</title><link>https://devzone.nordicsemi.com/thread/44847?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2016 13:02:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e829cb4-6a2c-43ff-ab51-b428cdc102d9</guid><dc:creator>makouda</dc:creator><description>&lt;p&gt;sorry I made mistake on my quetion. I had set &lt;code&gt;DFU_APP_DATA_RESERVED&lt;/code&gt;  to 0x400. I didnt touch &lt;code&gt;CODE_PAGE_SIZE&lt;/code&gt; . in the first link you share, it said in the last line : &lt;strong&gt;Application data is stored in the memory area between the application and the bootloader, right before the beginning of the bootloader.&lt;/strong&gt; . it&amp;#39;s exacly my case. unlike what you posted in answer : &lt;strong&gt;swap page that resides on the flash page just below the start address of the bootlaoder&lt;/strong&gt; it&amp;#39;s the user data page which I can see in flash, not the swap (see the flash memory dump)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: why app preserved data are lost after DFU</title><link>https://devzone.nordicsemi.com/thread/44846?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2016 12:19:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7600071-6dac-45ba-9240-1e9869ed995a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The CODE_PAGE_SIZE should not be changed from the default value of 0x400. This is the actaul page size for the flash implementation we have on the 51. Please see &amp;quot;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/bledfu_memory_appdata.html?cp=4_0_0_4_2_1_3_3"&gt;preserving application data&lt;/a&gt;&amp;quot; for instruction on how preserve app data when doing DFU.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re using pstorage you will also have to account for the swap page that resides on the flash page just below the start address of the bootlaoder. I.e., reserve at least two pages. More details on how the memory allocation with pstorage works can be found &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/lib_pstorage.html?cp=4_0_0_3_17_1#pstorage_memory_layout"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>