<?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>Fstorage timeout error for flash write (with BLE device bonded but without actively connected)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97852/fstorage-timeout-error-for-flash-write-with-ble-device-bonded-but-without-actively-connected</link><description>Hello Nordic team, 
 I am using fstorage library pointed to nrf_fstorage_sd in my application that has Softdevice S140 with one BLE device bonded to Nordic which has a Central role. I notice that flash operations are successful if there is no BLE device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Mar 2023 07:42:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97852/fstorage-timeout-error-for-flash-write-with-ble-device-bonded-but-without-actively-connected" /><item><title>RE: Fstorage timeout error for flash write (with BLE device bonded but without actively connected)</title><link>https://devzone.nordicsemi.com/thread/417817?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 07:42:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e47baa48-1a75-44c4-a218-1f1c3b0525ad</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;That&amp;#39;s great news Anusha. I will consider the case closed then &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage timeout error for flash write (with BLE device bonded but without actively connected)</title><link>https://devzone.nordicsemi.com/thread/417787?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 05:50:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0794419-9a7e-44aa-8498-af4dc0768958</guid><dc:creator>anusha_14</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/ovrebekk"&gt;ovrebekk&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for your suggestion. After reducing the scan window to half of scan interval, flash operation works as expected.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage timeout error for flash write (with BLE device bonded but without actively connected)</title><link>https://devzone.nordicsemi.com/thread/416974?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 07:59:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ae42c06-36aa-4858-96e3-2257cfb8e49b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Anusha&lt;/p&gt;
&lt;p&gt;Having a scan window equal to the scan interval means you are trying to scan 100% of the time, and it makes sense that this would affect the scheduling of lower priority activities.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try to reduce the scan window to around half and see if it improves the&amp;nbsp; performance?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As an example, try a scan interval of 1600 and a scan window of 800.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage timeout error for flash write (with BLE device bonded but without actively connected)</title><link>https://devzone.nordicsemi.com/thread/416793?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2023 12:36:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:437a2bc1-9279-481c-b353-92f7ee656395</guid><dc:creator>anusha_14</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/ovrebekk"&gt;ovrebekk&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for your response.&lt;/p&gt;
&lt;p&gt;In my application, the scanning parameters as defined in sdk_config.h are as follows:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_SCAN_INTERVAL: 1652&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_SCAN_DURATION: 0&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_SCAN_WINDOW: 1652&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL:7.5&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_MAX_CONNECTION_INTERVAL: 30&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_SLAVE_LATENCY: 0&lt;/p&gt;
&lt;p&gt;NRF_BLE_SCAN_SUPERVISION_TIMEOUT: 4000&lt;/p&gt;
&lt;p&gt;What would you recommend to change in scanning parameters to be able to perform flash operation without disabling scanning?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Anusha&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage timeout error for flash write (with BLE device bonded but without actively connected)</title><link>https://devzone.nordicsemi.com/thread/416477?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 09:57:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d63be5be-e741-4a7f-8028-6d7fadc42e43</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Anusha&lt;/p&gt;
&lt;p&gt;It should be possible to scan and access flash at the same time. Scanning has higher priority than flash access, but if the flash access is delayed for a long time it will get higher priority.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The full priority table can be found &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/multilink_scheduling/priorities_and_events_intro.html?cp=5_7_4_0_14_0"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Do you know what the scanning parameters are?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are in scan mode a lot of the time it will have a larger impact on other activities, such as flash access. If you try to increase the scan interval and/or reduce the scan window this might improve the flash performance.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage timeout error for flash write (with BLE device bonded but without actively connected)</title><link>https://devzone.nordicsemi.com/thread/416438?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 07:57:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9d30f43-86e3-4791-b9dc-278d1cb5c8fd</guid><dc:creator>anusha_14</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/ovrebekk"&gt;ovrebekk&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would like to add one more point: If I stop scanning, then writing to flash works fine. So, is it really recommended to stop scanning if we need to perform flash operations? Or can scanning be still managed while a flash operation has to occur?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Anusha&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage timeout error for flash write (with BLE device bonded but without actively connected)</title><link>https://devzone.nordicsemi.com/thread/416370?ContentTypeID=1</link><pubDate>Mon, 20 Mar 2023 19:24:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fa60371-62c9-4d7f-9cbd-297624d42eb0</guid><dc:creator>anusha_14</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/ovrebekk"&gt;ovrebekk&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;Thanks for your response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Are there any other changes in the flow of your application that might be changed after you have bonded to a device?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;After bonding to a device, Nordic continuously scans for advertisements of this device and connects to it if the advertisement data matches certain criteria. In the case where fstorage write times out, Nordic is not connected to the device.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Can you let me know which SDK version you are using, and if you are basing your code off of one of the standard examples?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I am using&amp;nbsp;nRF5_SDK_for_Thread_and_Zigbee_v4.1.0. Yes, I have used flash_fstorage example as my reference.&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_fstorage.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_fstorage.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Are you triggering the flash write at any particular point in the code, like after a specific Bluetooth event?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;No, flash write can occur when a specific command is sent over UART to Nordic. In the case I tested, device was bonded to Nordic but not connected.&lt;/p&gt;
&lt;p&gt;Please let me know if you need any other details to help in understanding possible cause of issue.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Anusha&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage timeout error for flash write (with BLE device bonded but without actively connected)</title><link>https://devzone.nordicsemi.com/thread/416283?ContentTypeID=1</link><pubDate>Mon, 20 Mar 2023 13:17:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef269b71-cad0-4732-943a-ec9e4b91bf2b</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Anusha&lt;/p&gt;
&lt;p&gt;It doesn&amp;#39;t really make sense that flash write would fail just because you have stored some bonding information through the flash library.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are there any other changes in the flow of your application that might be changed after you have bonded to a device?&lt;/p&gt;
&lt;p&gt;Can you let me know which SDK version you are using, and if you are basing your code off of one of the standard examples?&lt;/p&gt;
&lt;p&gt;Are you triggering the flash write at any particular point in the code, like after a specific Bluetooth event?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>