<?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>Regarding DFU operation while using BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104988/regarding-dfu-operation-while-using-ble</link><description>Hello. 
 This is a question regarding fstorage during DFU on S140 / RF5 SDK 17.1.0. 
 I think that conflicts are mediated within the DFU when writing to Flash during BLE communication, but according to the text here , ``Using too aggressive scan or advertising</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Nov 2023 01:49:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104988/regarding-dfu-operation-while-using-ble" /><item><title>RE: Regarding DFU operation while using BLE</title><link>https://devzone.nordicsemi.com/thread/456569?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2023 01:49:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a22c3331-dacc-41b5-8eac-b12e5f03e192</guid><dc:creator>hiroiwas</dc:creator><description>&lt;p&gt;Hello Simon.&lt;br /&gt;&lt;br /&gt;got it. It was as expected.&lt;br /&gt;&lt;br /&gt;We plan to actually measure how much it is blocked and how much of an impact it has on BLE communication, and reflect it in the design.&lt;br /&gt;&lt;br /&gt;thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Regarding DFU operation while using BLE</title><link>https://devzone.nordicsemi.com/thread/456393?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 12:31:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c955f40-1b8b-4376-98a9-76fa4a1c2682</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;I think you worry for nought here. The SoftDevice won&amp;#39;t schedule any other operations for when a flash write/erase is happening.&lt;/p&gt;
&lt;p&gt;Yes, incoming BLE events will be blocked while these are ongoing, but if you&amp;#39;re I.E. in a connection you can make sure this won&amp;#39;t be an issue by setting the connection supervision timeout and retry number higher so that the other side of the connection will retry if it doesn&amp;#39;t receive an ACK from your device.&lt;/p&gt;
&lt;p&gt;It will not be possible to both do flash access and avoid BLE to ever be blocked I&amp;#39;m afraid.&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><item><title>RE: Regarding DFU operation while using BLE</title><link>https://devzone.nordicsemi.com/thread/456092?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2023 09:16:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dc61ca0-4fb0-471f-b003-dcb88101daab</guid><dc:creator>hiroiwas</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello Simon.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please let me check.&lt;br /&gt;&lt;br /&gt;I understand that exclusive control is performed using the timeslot API, but fstotage ultimately calls sd_flash api.&lt;br /&gt;&lt;br /&gt;As mentioned above, sd_flash_write and sd_flash_page_erase written, &amp;quot;all interrupts will be blocked for a predictable time&amp;quot;, so there is a chance that they will block during the write operation, regardless of schedule. I&amp;#39;m worried that there is.&lt;br /&gt;&lt;br /&gt;Specifically, with erase, won&amp;#39;t all events including BLE be blocked for 85ms, which is equivalent to one page?&lt;br /&gt;It would be nice if BLE is never blocked from sd_flash_page_erase to NRF_EVT_FLASH_OPERATION_SUCCESS.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Regarding DFU operation while using BLE</title><link>https://devzone.nordicsemi.com/thread/456084?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2023 08:32:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ab17dcc-7f9b-4360-9a1d-5116ed917188</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The fstorage uses a timeslot API when the SoftDevice is part of the application to make sure both the flash operations and radio operations are able to work uninterrupted. The scheduling of the SoftDevice is explained in the SoftDevice specification &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s140%2FSDS%2Fs1xx%2Fmultilink_scheduling%2Fmultilink_scheduling.html"&gt;here&lt;/a&gt;. So when the flash is writing the BLE will indeed not be communicating at the same time, as it will be waiting for a new timeslot when the flash is finished with its operations.&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><item><title>RE: Regarding DFU operation while using BLE</title><link>https://devzone.nordicsemi.com/thread/455951?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2023 12:04:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9968a2d-e4dc-4bbb-a2c1-78ce73dc00a2</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I will have to discuss this with one of my colleagues that are out of office today before coming back to you. Sorry for the delay and any confusion here. I&amp;#39;ll clear it up for you (and me) ASAP.&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><item><title>RE: Regarding DFU operation while using BLE</title><link>https://devzone.nordicsemi.com/thread/455715?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 09:29:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:826e8dc8-bf1a-4cb4-b6b4-fc07bab2e4d6</guid><dc:creator>hiroiwas</dc:creator><description>&lt;p&gt;Hello again.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;From the above answer, I thought that BLE communication was prioritized over fstorage, but the Note of &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.3.0%2Fgroup___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html&amp;amp;resultof=%22%73%64%5f%66%6c%61%73%68%5f%77%72%69%74%65%22%20" rel="noopener noreferrer" target="_blank"&gt;sd_flash_write&lt;/a&gt; written, &amp;quot;This call takes control over the radio and the CPU during flash erase and write to make sure that they will not interfere with I found the following statement: the flash access. This means that all interrupts will be blocked for a predictable time.&amp;quot;&lt;br /&gt;&lt;br /&gt;If this note is correct, it can be understood that BLE interrupts will stop and communication will not be possible during flash writing.&lt;br /&gt;&lt;br /&gt;Is this correct?&lt;br /&gt;&lt;br /&gt;The system currently being designed writes in units of 256 bytes (64 words), so based on the nRF52840 specs, it is expected that the write time will be around 2.6 ms.&lt;br /&gt;&lt;br /&gt;Will this write affect BLE communication with a scan interval of 20ms and a connection interval of 15ms?&lt;br /&gt;For example, when a write occurs, does one interval is skipped, or does the write extend the interval.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Additionally&amp;nbsp;the erase time was even longer, reaching 85ms per page according to the specs.&lt;br /&gt;Since the minimum unit of erasing is a page, I think that BLE is prohibited for at least 85ms.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Regarding DFU operation while using BLE</title><link>https://devzone.nordicsemi.com/thread/452423?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 07:05:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7b151d5-32d3-4411-826b-20d2683ba946</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Yes, that&amp;#39;s correct. Please let me know if there are any follow-ups.&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><item><title>RE: Regarding DFU operation while using BLE</title><link>https://devzone.nordicsemi.com/thread/452106?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2023 00:12:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1e40580-f79d-478f-a73b-8d8372df359e</guid><dc:creator>hiroiwas</dc:creator><description>&lt;div class="AxqVh"&gt;
&lt;div class="OPPzxe"&gt;
&lt;div class="QFw9Te BLojaf"&gt;&lt;span&gt;Hello Simon.&lt;/span&gt;&lt;/div&gt;
&lt;div class="QFw9Te BLojaf"&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;Thank you for your prompt reply.&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;From the answers,&lt;/span&gt;&lt;/div&gt;
&lt;div class="QFw9Te BLojaf"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="QFw9Te BLojaf"&gt;&lt;span&gt;I found that BLE communication has priority over fstorage, so I think the only thing left to do is adjust the number of fstorage retries.&lt;/span&gt;&lt;/div&gt;
&lt;div class="QFw9Te BLojaf"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="QFw9Te BLojaf"&gt;&lt;span&gt;If you run into any problems with the actual code, please ask again.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Regarding DFU operation while using BLE</title><link>https://devzone.nordicsemi.com/thread/452032?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2023 14:33:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d1e66f3-9d3a-4077-86d6-061ddf1fa157</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;1. The BLE stack requires the SoftDevice and radio peripheral, which in turn requires the HF clock and CPU priority, which the FLASH operations also require, and these will cause a conflict if the flash storage and/or scan/advertising parameters are too aggressive.&lt;/p&gt;
&lt;p&gt;2. I think the question on conflicts is answered a bit further down in the documentation you quote. The SoftDevice will retry getting FSTORAGE, and if it can&amp;#39;t get access, eventually time out when the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__nrf__fstorage__config.html#ga9dae667c08aba31a7afd82ff627bdc09"&gt;NRF_FSTORAGE_SD_MAX_RETRIES&lt;/a&gt;&amp;nbsp;is met.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. Not really, it will all come down to your entire project, and most of the parameters you mention look good, but I&amp;#39;d maybe recommend setting the scan and window interval a bit higher (50-100ms perhaps) to avoid unnecessary conflicts with the FLASH.&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>