<?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>OpenThread and Flash Operations in Upcoming SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23916/openthread-and-flash-operations-in-upcoming-sdk</link><description>Hi Nordic, 
 I was reading the Wiki page for porting OpenThread to a new hardware platform ( github.com/.../Porting-Guide) and I noticed there isn&amp;#39;t a &amp;quot;flash.h&amp;quot; header file and a static library specifically for handling flash operations included in the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Aug 2017 08:47:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23916/openthread-and-flash-operations-in-upcoming-sdk" /><item><title>RE: OpenThread and Flash Operations in Upcoming SDK</title><link>https://devzone.nordicsemi.com/thread/94129?ContentTypeID=1</link><pubDate>Thu, 03 Aug 2017 08:47:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0adaf61c-9e62-4535-86c3-335c744884fc</guid><dc:creator>Lukasz Duda</dc:creator><description>&lt;p&gt;Hello Jay!&lt;/p&gt;
&lt;p&gt;Thread protocol in general requires to keep some information in the non-volatile memory e.g. Operational Dataset (Channel, Pan ID) or security information (e.g. frame counters).&lt;/p&gt;
&lt;p&gt;OpenThread exposes only &lt;code&gt;platform/settings.h&lt;/code&gt; file which is used by higher layers to store Thread-specific information. &lt;code&gt;Flash.h&lt;/code&gt; header that you refer to is the internal file used by default implementation of settings module (&lt;em&gt;examples/platforms/utils/&lt;/em&gt;). Note that OpenThread allows to replace this implementation to platform specific one.&lt;/p&gt;
&lt;p&gt;Because of that i do not recommend to use &lt;code&gt;settings.h&lt;/code&gt; API to store application-specific information.&lt;/p&gt;
&lt;p&gt;Instead i would recommend to reserve some space in a flash region and use libraries implemented in our SDK to store an application-data there.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;In case you want to create Thread-only application (without concurrent BLE) you can use &lt;code&gt;NVMC&lt;/code&gt; module from SDK (&lt;em&gt;components/drivers_nrf/hal/nrf_nvmc.h&lt;/em&gt;) directly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In case you want to create application that utilizes dynamic multiprotocol solution (Openthread and Softdevice simultanously) you can use either &lt;code&gt;fstorage&lt;/code&gt; or &lt;code&gt;fds&lt;/code&gt; modules or make direct SVC calls to SoftDevice e.g. by using &lt;code&gt;sd_flash_write&lt;/code&gt; API.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In both cases make sure you choose flash region other that one used by OpenThread (to not override them). Currently we use 4 last pages of the flash region for that purpose.&lt;/p&gt;
&lt;p&gt;Regarding to your side question, the behaviour of flash operations performing by SoftDevice should not be different in case you have BLE only or BLE and Thread application. There is however bigger chance that the &lt;code&gt;sd_flash_write&lt;/code&gt; operation will return NRF_ERROR_BUSY error due to flash operation already scheduled by Thread stack.&lt;/p&gt;
&lt;p&gt;Give me know if you have more questions!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>