<?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>Secure Bootloader USB Debug only works if there&amp;#39;s no application in the flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46886/secure-bootloader-usb-debug-only-works-if-there-s-no-application-in-the-flash</link><description>IAR 7.60 
 52840 
 nRF5_SDK_15.2.0_9412b96 
 
 Hi there, I&amp;#39;m trying to do some modification in the bootloader (so that we can write the image to the flash&amp;#39;s bank1 using our custom method via wifi and just have the bootloader proceed from there). But using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 May 2019 22:25:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46886/secure-bootloader-usb-debug-only-works-if-there-s-no-application-in-the-flash" /><item><title>RE: Secure Bootloader USB Debug only works if there's no application in the flash</title><link>https://devzone.nordicsemi.com/thread/187707?ContentTypeID=1</link><pubDate>Fri, 17 May 2019 22:25:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fb4014f-d1f3-4541-9552-6156f6b285aa</guid><dc:creator>Cecylia</dc:creator><description>&lt;p&gt;Got it, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader USB Debug only works if there's no application in the flash</title><link>https://devzone.nordicsemi.com/thread/186893?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 09:23:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc1cd089-3914-4cbe-aa11-b008669d9aee</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;When you power on the chip, the bootloader will check if it should enter DFU mode or not. There are several methods to enter DFU mode,&amp;nbsp;and you can configure them in sdk_config.h.&amp;nbsp;The different methods are documented &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_bootloader.html?cp=5_4_0_3_5_0_2#lib_bootloader_dfu_mode"&gt;here&lt;/a&gt;. If none of these methods have been used to activate DFU mode, the bootloader will check if the application is valid, and if it&amp;#39;s valid, the bootloader will start the app.&lt;/p&gt;
&lt;p&gt;The inactivity timer is used when you&amp;nbsp;activate&amp;nbsp;and enter DFU mode, and then you have the configured amount of ms to start the DFU, before the bootloader exits DFU mode, and tries to start the app again. If the non-debug bootloader does not start the app&amp;nbsp;immediately, then one of the methods for entering DFU mode have been activated, OR the app that is on the chip is not valid.&lt;/p&gt;
[quote userid="12462" url="~/f/nordic-q-a/46886/secure-bootloader-usb-debug-only-works-if-there-s-no-application-in-the-flash"] I can only run the upgrade once, only if there&amp;#39;s no application on the flash.[/quote]
&lt;p&gt;You need a way to enter DFU mode. By default, the project have&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON enabled, with&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN set to 25. That means that you can hold down button 4 when you reset the board, and&amp;nbsp;then the bootloader will enter DFU mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader USB Debug only works if there's no application in the flash</title><link>https://devzone.nordicsemi.com/thread/185806?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 20:43:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:154cf8bc-45b8-4399-b873-438e6b601c46</guid><dc:creator>Cecylia</dc:creator><description>&lt;p&gt;I did not add &amp;quot;DFU Trigger Library&amp;quot; to the application yet.&lt;br /&gt;&lt;br /&gt;However, I forgot to tell you, actually I changed something in the bootloader.&amp;nbsp; I changed the setting to&lt;br /&gt;&amp;quot;#define NRF_BL_DFU_INACTIVITY_TIMEOUT_MS 10000&amp;quot;&lt;br /&gt;&lt;br /&gt;In the non-debug version of the bootloader, it works as I intended.&amp;nbsp; That is, when I plug in the Nordic to the USB, it will show up as &amp;quot;nrf52 sDFU USB&amp;quot; in the Device Manager for 10 seconds before it tries to go to application.&amp;nbsp; So it gives me opportunity to update the FW within 10 seconds.&lt;br /&gt;&lt;br /&gt;But in the debug version, it doesn&amp;#39;t work the same way.&amp;nbsp; Why? Should I prepare the application differently if I use Debug Bootloader?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader USB Debug only works if there's no application in the flash</title><link>https://devzone.nordicsemi.com/thread/185790?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 15:33:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d371ad22-34ba-4577-aa6d-b87b77ed9aa7</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How are you&amp;nbsp;entering DFU mode again after the first DFU ?&amp;nbsp;Have you added the&amp;nbsp;&lt;span&gt;DFU Trigger Library&amp;nbsp;to your application ? &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_dfu_trigger_usb.html?cp=5_0_3_5_3"&gt;See this page.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>