<?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>DFU SVCI initialisation crash when adding DFU buttonless service after disabling and re-enabling softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73206/dfu-svci-initialisation-crash-when-adding-dfu-buttonless-service-after-disabling-and-re-enabling-softdevice</link><description>Hi Nordic team, Due to critical real time constraints, I have to temporarily disable the softdevice, perform data acquisition from sensors, then enable it again. I&amp;#39;m using softdevice s130 v5.0.0 on nRF52832 and SDK 14.2.0 for both application and bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Mar 2021 16:27:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73206/dfu-svci-initialisation-crash-when-adding-dfu-buttonless-service-after-disabling-and-re-enabling-softdevice" /><item><title>RE: DFU SVCI initialisation crash when adding DFU buttonless service after disabling and re-enabling softdevice</title><link>https://devzone.nordicsemi.com/thread/301994?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 16:27:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9eb3c3cd-e919-4027-adf4-873bcc781ffe</guid><dc:creator>Aymen Rejeb</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Good news, I think that I have found the root cause of this weird behavior!&lt;/p&gt;
&lt;p&gt;Actually, I have found a DFU SVCI initialization issue that was raised and reported it the&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38139/dfu-svci-initialisation-missing-critical-section" rel="noopener noreferrer" target="_blank"&gt;DFU SVCI initialisation, missing critical section&lt;/a&gt; discussion in the devzone and I have applied the provided patch, which adds a critical section while temporarily redirecting interrupts to bootloader and the problem was solved &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/263a.svg" title="Relaxed"&gt;&amp;#x263a;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU SVCI initialisation crash when adding DFU buttonless service after disabling and re-enabling softdevice</title><link>https://devzone.nordicsemi.com/thread/301955?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 14:54:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7cf6609-6aa2-49e5-a45d-33e9ef2f85c9</guid><dc:creator>Aymen Rejeb</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your quick reply, I&amp;#39;m using &lt;strong&gt;bootloader_secure_ble &lt;/strong&gt;example in SDK 14.2.0&lt;/p&gt;
&lt;p&gt;Now, I was trying to reproduce the same behavior that I mentioned in my question, but what I get is a weird behavior:&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;&lt;span style="background-color:#ffff00;"&gt;nrf_dfu_set_adv_name_init&lt;/span&gt;&lt;/strong&gt; sometimes returns NRF_SUCCESS:&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/nrf_5F00_dfu_5F00_set_5F00_adv_5F00_name_5F00_init.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;and then application is hanging at the first instruction in the &lt;strong&gt;nrf_dfu_svci_vector_table_unset &lt;/strong&gt;at &lt;strong&gt;NRF_LOG_INFO&lt;/strong&gt; and does not return! and still blocked at __sd_nvic_irq_enable():&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/nrf_5F00_dfu_5F00_svci_5F00_vector_5F00_table_5F00_unset.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;And sometime is still blocked at a different instruction! and sometime is works fine!&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/nrf_5F00_dfu_5F00_svci_5F00_vector_5F00_table_5F00_unset-2.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried to comment out the call the &lt;strong&gt;NRF_LOG_INFO &lt;/strong&gt;in the &lt;strong&gt;nrf_dfu_svci_vector_table_unset&lt;/strong&gt; function (as it is 90% failing at this level), the application still hanging at&amp;nbsp;&lt;strong&gt;nrf_dfu_set_adv_name_init&amp;nbsp;&lt;/strong&gt;and don&amp;#39;t return, it still blocked:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/nrf_5F00_dfu_5F00_set_5F00_adv_5F00_name_5F00_init-2.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;So as you can see once the &lt;strong&gt;nrf_dfu_set_adv_name_init&lt;/strong&gt; is getting executed (after disabling and enabling again the softdevice) I start having a weird behavior!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m start wondering if it is not an issue related to interrupts enable/disable between the applicaton, bootloader&lt;/p&gt;
&lt;p&gt;&amp;nbsp;and softdevice?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU SVCI initialisation crash when adding DFU buttonless service after disabling and re-enabling softdevice</title><link>https://devzone.nordicsemi.com/thread/301926?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 13:44:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc1c4a79-f96c-4a0b-af8f-0710e0964a3a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What does nrf_dfu_set_adv_name_init() return when the application crashes?&lt;/p&gt;
&lt;p&gt;And what sort of bootloader did you flash? Was it the BLE bootloader?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>