<?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>bootloader only enters DFU when using a breakpoint due to watchdog timeout.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74485/bootloader-only-enters-dfu-when-using-a-breakpoint-due-to-watchdog-timeout</link><description>We use nRF SDK5 17.0.2 with Softdevice S140 on an nRF52840-DK. We have a firmware that we always want to start in DFU mode, then use the abort command to be used to start the application. We use the bootloader with USB from the examples, that we have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 Apr 2021 11:41:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74485/bootloader-only-enters-dfu-when-using-a-breakpoint-due-to-watchdog-timeout" /><item><title>RE: bootloader only enters DFU when using a breakpoint due to watchdog timeout.</title><link>https://devzone.nordicsemi.com/thread/307229?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 11:41:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95554f6c-98ed-445e-8ce2-22ffc5391608</guid><dc:creator>SebastianA</dc:creator><description>&lt;p&gt;Yes, that was it!&lt;br /&gt;&lt;br /&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader only enters DFU when using a breakpoint due to watchdog timeout.</title><link>https://devzone.nordicsemi.com/thread/307202?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 10:23:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e841ced4-00f9-49bb-a96a-d8e4ac38e215</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I suspect this might be caused by a bug in the SDK.&lt;/p&gt;
&lt;p&gt;Could you try the fix described by Einar in this post?&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/67267/watchdog-reset-during-bootloader-dfu/275769#275769"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/67267/watchdog-reset-during-bootloader-dfu/275769#275769&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader only enters DFU when using a breakpoint due to watchdog timeout.</title><link>https://devzone.nordicsemi.com/thread/307098?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2021 17:35:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b4a1dd5-bcbe-427b-b6fe-741f56529861</guid><dc:creator>SebastianA</dc:creator><description>&lt;p&gt;Yes, NRF_BL_DFU_ENTER_METHOD_GPREGRET was turned on in our project otherwise the bootloader wouldn&amp;#39;t get to the mentioned breakpoints. Our project is a copy of the secure_bootloader example, with the mentioned changes in sdk_config.h.&lt;br /&gt;&lt;br /&gt;I now turned on&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_GPREGRET in the open_bootloader/pca10056_usb_debug example and tried it.&lt;br /&gt;&lt;br /&gt;I get the same behaviour with that bootloader. The log says:&lt;br /&gt;&lt;br /&gt;&amp;lt;info&amp;gt; app: Open USB bootloader started&lt;br /&gt;&amp;lt;debug&amp;gt; app: In nrf_bootloader_init&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Using settings page.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Copying forbidden parts from backup page.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Enter nrf_bootloader_fw_activate&lt;br /&gt;&amp;lt;info&amp;gt; app: No firmware to activate.&lt;br /&gt;&amp;lt;debug&amp;gt; app: App is valid&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_dfu_settings: No additional data erased&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Running nrf_bootloader_app_start with address: 0x00001000&lt;br /&gt;&amp;lt;debug&amp;gt; app: Disabling interrupts. NVIC-&amp;gt;ICER[0]: 0x0&lt;br /&gt;&amp;lt;info&amp;gt; app: Open USB bootloader started&lt;br /&gt;&amp;lt;debug&amp;gt; app: In nrf_bootloader_init&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Using settings page.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Copying forbidden parts from backup page.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Enter nrf_bootloader_fw_activate&lt;br /&gt;&amp;lt;info&amp;gt; app: No firmware to activate.&lt;br /&gt;&amp;lt;debug&amp;gt; app: App is valid&lt;br /&gt;&lt;strong&gt;&amp;lt;debug&amp;gt; app: DFU mode requested via GPREGRET.&lt;/strong&gt;&lt;br /&gt;&amp;lt;info&amp;gt; nrf_bootloader_wdt: WDT enabled CRV:65536 ticks&lt;br /&gt;&amp;lt;info&amp;gt; nrf_bootloader_wdt: Starting a timer (62336 ticks) for feeding watchdog.&lt;br /&gt;&amp;lt;debug&amp;gt; app: timer_activate (0x20000038)&lt;br /&gt;&amp;lt;debug&amp;gt; app: in weak nrf_dfu_init_user&lt;br /&gt;&amp;lt;debug&amp;gt; app: timer_stop (0x20000028)&lt;br /&gt;&lt;strong&gt;&amp;lt;info&amp;gt; app: Entering DFU mode.&lt;/strong&gt;&lt;br /&gt;&amp;lt;info&amp;gt; app_timer: RTC: initialized.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Initializing transports (found: 1)&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_serial_usb: Initializing drivers.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_serial_usb: Starting USB&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_serial_usb: USB Transport initialized&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Enter main loop&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_serial_usb: USB power detected&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_serial_usb: USB ready&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;lt;info&amp;gt; app: Open USB bootloader started&lt;/strong&gt;&lt;br /&gt;&amp;lt;debug&amp;gt; app: In nrf_bootloader_init&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Using settings page.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Copying forbidden parts from backup page.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Enter nrf_bootloader_fw_activate&lt;br /&gt;&amp;lt;info&amp;gt; app: No firmware to activate.&lt;br /&gt;&amp;lt;debug&amp;gt; app: App is valid&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_dfu_settings: No additional data erased&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Running nrf_bootloader_app_start with address: 0x00001000&lt;br /&gt;&amp;lt;debug&amp;gt; app: Disabling interrupts. NVIC-&amp;gt;ICER[0]: 0x0&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I can also get it to work in the same way by adding a breakpoint in the right place and pressing continue. Then it stays in DFU mode until I ask it to start the application via the ABORT command over the USB connection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bootloader only enters DFU when using a breakpoint due to watchdog timeout.</title><link>https://devzone.nordicsemi.com/thread/307058?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2021 14:03:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:358f4005-0901-41d6-8c77-6f13b8184ece</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]After around five seconds I reset it with NVIC_SystemReset and expect to get back to DFU mode. That doesn&amp;#39;t happen, the application starts again.[/quote]
&lt;p&gt;I assume you have&amp;nbsp;&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_GPREGRET set to 1 in sdk_config.h in the bootloader project?&lt;/p&gt;
&lt;p&gt;Could you use the bootloader project with _debug suffix, i.e. pca10056_s140_ble_debug, and check the nrf_log for why it doesn&amp;#39;t stay in DFU mode?&lt;/p&gt;
&lt;p&gt;(If you are using SES to view the RTT log you might need to set NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED to 0)&lt;/p&gt;
&lt;p&gt;It should print &amp;quot;DFU mode requested via GPREGRET.&amp;quot; in&amp;nbsp;dfu_enter_check() function ...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>