<?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>Flash Storage example with SoftDevice not working in SDK15?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35130/flash-storage-example-with-softdevice-not-working-in-sdk15</link><description>Hello, 
 I am facing an issue when trying to use the example flash_fstorage_example in SDK15 with the softdevice. According to the documentation, using the reading and write command should give me some predifned strings. However, that is not the case</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Jun 2018 07:01:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35130/flash-storage-example-with-softdevice-not-working-in-sdk15" /><item><title>RE: Flash Storage example with SoftDevice not working in SDK15?</title><link>https://devzone.nordicsemi.com/thread/135062?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 07:01:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eee2c30a-5298-49e5-936e-e50f90ad6a0b</guid><dc:creator>JCL0</dc:creator><description>&lt;p&gt;I think I have found the issue, it lies on the fact that the start address and the end address where I can write data into where wrong in the example. In that there was application data already present there, chaning those addresses along with those defined in the writting to adjust to the newer memory addresses solved the problem&lt;/p&gt;
&lt;p&gt;My solution&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_FSTORAGE_DEF(nrf_fstorage_t fstorage) =
{
    /* Set a handler for fstorage events. */
    .evt_handler = fstorage_evt_handler,

    /* These below are the boundaries of the flash space assigned to this instance of fstorage.
     * You must set these manually, even at runtime, before nrf_fstorage_init() is called.
     * The function nrf5_flash_end_addr_get() can be used to retrieve the last address on the
     * last page of flash available to write data. */
    .start_addr = 0x4e000,
    .end_addr   = 0x4ffff,
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Example&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_FSTORAGE_DEF(nrf_fstorage_t fstorage) =
{
    /* Set a handler for fstorage events. */
    .evt_handler = fstorage_evt_handler,

    /* These below are the boundaries of the flash space assigned to this instance of fstorage.
     * You must set these manually, even at runtime, before nrf_fstorage_init() is called.
     * The function nrf5_flash_end_addr_get() can be used to retrieve the last address on the
     * last page of flash available to write data. */
    .start_addr = 0x3e000,
    .end_addr   = 0x3ffff,
};
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Storage example with SoftDevice not working in SDK15?</title><link>https://devzone.nordicsemi.com/thread/134855?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 08:29:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62460d69-d051-4d4a-8d66-d54f0eecb80f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;BADC0FFE and DEADBEEF are not strings, they are HEX values. Please try reading using &amp;#39;read hex&amp;#39; command instead:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="batchfile"&gt;fstorage example:~$ read str 0x3e000 4
▒ܺ
fstorage example:~$ read str 0x3e100 4
ﾭ▒

fstorage example:~$ read hex 0x3e100 4
0xEF 0xBE 0xAD 0xDE
fstorage example:~$ read hex 0x3e000 4
0xFE 0xF 0xDC 0xBA

fstorage example:~$ read hex 0x3F000 12
0x68 0x65 0x6C 0x6C 0x6F 0x20 0x77 0x6F 0x72 0x6C 0x64 0x0
fstorage example:~$ read str 0x3F000 12
hello world&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure what happened to your reading of the string &amp;quot;hello world&amp;quot;. Please try to erase the board (&amp;#39;nrfjprog -e&amp;#39; command will rease all flash) and flash the example once more. You can check the content of the memory using nrfjprog:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="batchfile"&gt;&amp;gt; nrfjprog --memrd 0x3e000 --w 32 
0x0003E000: BADC0FFE |....| 

&amp;gt; nrfjprog --memrd 0x3e100 --w 32 
0x0003E100: DEADBEEF |....| 

&amp;gt; nrfjprog --memrd 0x3f000 --w 8 --n 12 
0x0003F000: 68 65 6C 6C 6F 20 77 6F 72 6C 64 00 |hello world.|&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>