<?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>Using Flash Data Storage to write Flash, turning BLE on results in FDS_ERR_BUSY in the flash write handler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57461/using-flash-data-storage-to-write-flash-turning-ble-on-results-in-fds_err_busy-in-the-flash-write-handler</link><description>Using SDK nrf52_sdk_16.0.0 PCA10040 S132 
 My code can read and write Flash using the &amp;quot;Data Storage Flash&amp;quot; interface, IE calling fds_record_write(...) and waiting for events in my callback with no issue. 
 WHen I added BLE advertising using the example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Feb 2020 22:13:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57461/using-flash-data-storage-to-write-flash-turning-ble-on-results-in-fds_err_busy-in-the-flash-write-handler" /><item><title>RE: Using Flash Data Storage to write Flash, turning BLE on results in FDS_ERR_BUSY in the flash write handler</title><link>https://devzone.nordicsemi.com/thread/233378?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2020 22:13:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e630c000-fb43-4f43-8bbe-dd9040ad497c</guid><dc:creator>robin</dc:creator><description>&lt;p&gt;Hi Simon&lt;/p&gt;
&lt;p&gt;Enabling the Softdevice before initializing the FDS solved the problem.&lt;/p&gt;
&lt;p&gt;Thanks Robin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Flash Data Storage to write Flash, turning BLE on results in FDS_ERR_BUSY in the flash write handler</title><link>https://devzone.nordicsemi.com/thread/233360?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2020 16:54:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a50611af-fe76-4580-ad0b-068857dba4c3</guid><dc:creator>robin</dc:creator><description>&lt;p&gt;Hi Simon&lt;/p&gt;
&lt;p&gt;I will need to do some more checking and testing I am fairly new to Nordic and its not clear to me when&amp;nbsp; the SoftDevice is enabled, I thought it was enabled for FDS ?&lt;/p&gt;
&lt;p&gt;In my current code I am Initializing FDS, then writing to it successfully and then I turn on BLE for 1 minute and then I make the 2nd FDS write which fails.&lt;/p&gt;
&lt;p&gt;Below is the order of calls I make for BLE without all the details, based on what you have said I think I need to be possibly calling&amp;nbsp;&amp;nbsp;nrf_sdh_enable_request()&amp;nbsp; before I initialize the FDS or setup all of my BLE but dont start the advertising.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will loom at this and if i am still stuck will upload the code for you to look at .&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is the order of calls I make to start BLE comes from the Beacon example.&lt;/p&gt;
&lt;p&gt;err_code = nrf_sdh_enable_request();&lt;/p&gt;
&lt;p&gt;err_code = nrf_sdh_ble_default_cfg_set(APP_BLE_CONN_CFG_TAG, &amp;amp;ram_start);&lt;/p&gt;
&lt;p&gt;err_code = nrf_sdh_ble_enable(&amp;amp;ram_start);&lt;/p&gt;
&lt;p&gt;err_code = ble_advdata_encode(&amp;amp;advdata, m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);&lt;/p&gt;
&lt;p&gt;err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;m_adv_params);&lt;/p&gt;
&lt;p&gt;err_code = sd_ble_gap_adv_start(m_adv_handle, APP_BLE_CONN_CFG_TAG);&lt;/p&gt;
&lt;p&gt;err_code = bsp_indication_set(BSP_INDICATE_ADVERTISING);&lt;/p&gt;
&lt;p&gt;Then I call below to stop BLE&lt;br /&gt; err_code = sd_ble_gap_adv_stop(m_adv_handle);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Flash Data Storage to write Flash, turning BLE on results in FDS_ERR_BUSY in the flash write handler</title><link>https://devzone.nordicsemi.com/thread/233218?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2020 09:47:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c43dded7-b86f-4d90-847a-a53c25f00b87</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Do you enable the SoftDevice after initializing the FDS? If so, could you try to switch it, and see if the problem is still present? First enable the SoftDevice then initialize the FDS library, as suggested &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/24901/fds-and-softdevice-sdk14"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t work, could you upload your project and I&amp;#39;ll take a look at it?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>