<?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>About sd_flash_write function - 0xFF evaluation &amp;amp; delay time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8215/about-sd_flash_write-function---0xff-evaluation-delay-time</link><description>Hi guys, 
 I have some questions about sd_flash_write function: 
 
 
 Will sd_flash_write() evaluates if the input value is 0xFF so that it won&amp;#39;t need to perform an unnecessary write? 
 
 
 If there is no 0xFF evaluation, would it be faster to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Jul 2018 09:21:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8215/about-sd_flash_write-function---0xff-evaluation-delay-time" /><item><title>RE: About sd_flash_write function - 0xFF evaluation &amp; delay time</title><link>https://devzone.nordicsemi.com/thread/139846?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 09:21:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebf34f7d-051a-4b34-b3ae-720a6d981d9f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;This is a 3 years old case, please create a new case. We suggest you to use fstorage, and fds instead of accessing the softdevice flash API directly. Here is &lt;a href="https://github.com/NordicPlayground/nRF5-flash-storage-examples"&gt;some examples.&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sd_flash_write function - 0xFF evaluation &amp; delay time</title><link>https://devzone.nordicsemi.com/thread/139781?ContentTypeID=1</link><pubDate>Wed, 11 Jul 2018 20:31:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c08dfe60-993f-4074-a691-59bb3dd0070c</guid><dc:creator>boston</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;quot;You should implement a check for the flash call back event (NRF_EVT_FLASH_OPERATION_ERROR, NRF_EVT_FLASH_OPERATION_SUCCESS) in the system event instead of rely on the timing.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I would like to implement this but don&amp;#39;t know how...do you know of any examples?&amp;nbsp; I actually haven&amp;#39;t found any examples using sd_flash_write at all.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sd_flash_write function - 0xFF evaluation &amp; delay time</title><link>https://devzone.nordicsemi.com/thread/29573?ContentTypeID=1</link><pubDate>Mon, 20 Jul 2015 09:12:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e98d2346-f227-4dff-9deb-2c2fc99a0952</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@chd: You are welcome. If the answer answered your question, please mark it as correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sd_flash_write function - 0xFF evaluation &amp; delay time</title><link>https://devzone.nordicsemi.com/thread/29572?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 15:08:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e51daafc-0348-436b-85ca-5ec29c671cdd</guid><dc:creator>chd</dc:creator><description>&lt;p&gt;So the max time to write a page would be around 11.8ms which is smaller than erase time. Not a big deal for my app, I guess. Anyway, thank you Hung!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About sd_flash_write function - 0xFF evaluation &amp; delay time</title><link>https://devzone.nordicsemi.com/thread/29571?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2015 11:45:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a63063be-4441-46b0-aa20-4c34d163a609</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Chd:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;No, I don&amp;#39;t think we have that check in our code in the softdevice.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I don&amp;#39;t have the exact amount of time for writing 0xFF, what we have is the maximum timing , which is 46.3us for writing a 32bit word from flash.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You would need to consider the blocking time by the softdevice&amp;#39;s radio activity. So it will be 256x46.3 + blocking time. The blocking time is depend on the number of BLE packets have to be transmitted, and if there is any other activity that has higher priority that the flash operation.
The erase time is also defined in the spec, which is 22.3ms. But the erase command also have to be scheduled and the scheduler is dependent on the BLE activity.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You should implement a check for the flash call back event (NRF_EVT_FLASH_OPERATION_ERROR, NRF_EVT_FLASH_OPERATION_SUCCESS) in the system event  instead of rely on the timing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>