<?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>Recursive calls to &amp;quot;app_sched_execute&amp;quot; in nRF Bootloader flow</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23779/recursive-calls-to-app_sched_execute-in-nrf-bootloader-flow</link><description>Hello,
I have the following observation regarding the potential problem with DFU bootloader
implementation : 
 I have noticed that the Bootloader DFU implementation (nRF5_SDK_13.1.0) allows for the recursive calls to the &amp;quot;app_sched_execute&amp;quot; which cause</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Oct 2017 23:02:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23779/recursive-calls-to-app_sched_execute-in-nrf-bootloader-flow" /><item><title>RE: Recursive calls to "app_sched_execute" in nRF Bootloader flow</title><link>https://devzone.nordicsemi.com/thread/93531?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 23:02:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46a5077e-3887-4db6-8f7b-a557c68972d0</guid><dc:creator>sdaexpert</dc:creator><description>&lt;p&gt;I am trying to understand how exactly  the problem of &amp;quot;recursivity&amp;quot;  was solved in the Bootloader&amp;#39;s implementation in SDK14. I see that, for instance, in the source code file &amp;quot;nrf_dfu_settings.c&amp;quot; the call to &amp;quot;wait_for_queue()&amp;quot;  from &amp;quot;nrf_dfu_settings_write()&amp;quot; function has been removed. (That call in SDK13 was one of the reasons why the &amp;quot;recursive&amp;quot; calls to the &amp;quot;app_sched_execute&amp;quot; could have happen in SDK13).&lt;/p&gt;
&lt;p&gt;However, it appears that without the above call to  &amp;quot;wait_for_queue()&amp;quot;, the calls to
nrf_dfu_flash_erase() and nrf_dfu_flash_store() in SDK14 are performed without checking if there is an available room in the command queue &amp;quot;nrf_fstorage_sd_queue_t m_queue&amp;quot;  in the &amp;quot;nrf_fstorage&amp;quot; module.
Is is possible that the calls to nrf_dfu_flash_erase() and nrf_dfu_flash_store()  might fail b/c of no room in that queue is available ? How is that prevented in SDK14 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Recursive calls to "app_sched_execute" in nRF Bootloader flow</title><link>https://devzone.nordicsemi.com/thread/93532?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 06:37:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faf29483-4f4c-41e2-8f0c-a0862df327ff</guid><dc:creator>sdaexpert</dc:creator><description>&lt;p&gt;I wanted to see if Nordic could possibly provide for the &amp;quot;sub-set&amp;quot; of the changes between SDK13 and SDK14 which actually implement the fix for the &amp;quot;recursivity&amp;quot; problem of the DFU bootloader in SDK13. The reason for the question is that we have a &amp;quot;production-level&amp;quot; DFU bootloader based on SDK13 which we would like to &amp;quot;patch up&amp;quot; to fix that problem. Porting the whole bootloader from SDK 14 is not desirable in our case given our time frame&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Recursive calls to "app_sched_execute" in nRF Bootloader flow</title><link>https://devzone.nordicsemi.com/thread/93530?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 06:30:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcf931e9-dda9-42da-8a4c-1ed4e2c62940</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Yes, this have been fixed in the SDK v14.0.0 release.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Recursive calls to "app_sched_execute" in nRF Bootloader flow</title><link>https://devzone.nordicsemi.com/thread/93529?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 00:09:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c18c3d26-7a43-4d7f-ac43-fbf7e535115a</guid><dc:creator>sdaexpert</dc:creator><description>&lt;p&gt;Hello,
I have noticed that in the latest SDK release nRF5_SDK_14.0.0_3bcc1f7, the nrf_dfu_wait() function has been eliminated.
Does it mean that &amp;quot;recursivity&amp;quot; problem (as described in the context of this thread) has been eliminated in that SDK version ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Recursive calls to "app_sched_execute" in nRF Bootloader flow</title><link>https://devzone.nordicsemi.com/thread/93528?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2017 10:47:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14894698-51e6-42e7-b1cc-9e42c2c6044e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You are correct that the current usage of the Application Scheduler could lead to the the behavior you&amp;#39;re describing. This has already been discovered internally and this will be fixed in the upcoming release of the SDK.&lt;/p&gt;
&lt;p&gt;Unfortunately, I do not have a patch that can be applied to SDK v13.x.x, so my advice would be to wait until the next release which is expected very soon.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>