<?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>Reading from flash using FDS while BLE is connected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96215/reading-from-flash-using-fds-while-ble-is-connected</link><description>Hi! We&amp;#39;re holding a large amount of data in flash, and would like to pass it onto the central when connected. 
 Currently, we&amp;#39;re following this process: 
 1. Read one buffer of size X from flash into a Ram buffer of size X. 
 2. Start advertising and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Feb 2023 13:22:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96215/reading-from-flash-using-fds-while-ble-is-connected" /><item><title>RE: Reading from flash using FDS while BLE is connected</title><link>https://devzone.nordicsemi.com/thread/407546?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2023 13:22:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71b34b02-bfd6-47dc-bd13-c260ff86e3a8</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]This seems inefficient to me. I&amp;#39;d rather read the flash buffers while we&amp;#39;re connected, and not terminate the connection until all flash has been transmitted.[/quote]
&lt;p&gt;I fully agree, and I don&amp;#39;t&amp;nbsp;understand the fundamental issue here. There is no problem with reading from flash while in a BLE connection. An in fact, flash is read while in a BLE connection already, as code executes from flash.&lt;/p&gt;
[quote user=""]Is there a problem with the approach I&amp;#39;m thinking of? The flash read is non blocking, so the connection may stay open for a bit of time.[/quote]
&lt;p&gt;I cannot think of any reason why copying data to RAM&amp;nbsp;earlier rather than later&amp;nbsp;provide any benefits.&lt;/p&gt;
[quote user=""]Which approach is more efficient in terms of power consumption?[/quote]
&lt;p&gt;Regarding current consumption I doubt you will find any measurable difference in current consumption between the two approaches you describe.&lt;/p&gt;
[quote user=""]Is there a recommended way of doing this to minimize idle time? (for example have 2 ram buffers- one for transmitting the data over BLE, one for reading the next data from flash?)[/quote]
&lt;p&gt;No, not really. (And I would be&amp;nbsp;suprised&amp;nbsp;if this is where the bottlenecks are in your product).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>