<?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>Reset into USB bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51210/reset-into-usb-bootloader</link><description>This is for the SDK nRF5_SDK_15.2.0_9412b96 and custom hardware. 
 I have a bootloader based off the example secure_bootloader_usb_mbr_pca10056 project. I want the application to reset and stay in bootloader mode, from a user command. 
 From another post</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Nov 2019 16:17:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51210/reset-into-usb-bootloader" /><item><title>RE: Reset into USB bootloader</title><link>https://devzone.nordicsemi.com/thread/219741?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 16:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4081828-7196-4937-ac53-271ad1164f06</guid><dc:creator>Ken A</dc:creator><description>&lt;p&gt;The watchdog logic still does not work.&lt;/p&gt;
&lt;p&gt;In the main application, the default watchdog timeout is 2000 ms.&lt;/p&gt;
&lt;p&gt;To reset into bootloader mode, I call:&lt;/p&gt;
&lt;p&gt;nrf_wdt_reload_value_set((60000U* 32768U));&lt;br /&gt; nrf_drv_wdt_channel_feed(wdtId);&lt;/p&gt;
&lt;p&gt;#define BOOTLOADER_DFU_START 0xB1&lt;br /&gt; sd_power_gpregret_set(0, BOOTLOADER_DFU_START);&lt;br /&gt; NVIC_SystemReset();&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the bootloader, I call:&lt;/p&gt;
&lt;p&gt;// set a long timeout&lt;br /&gt; nrf_wdt_reload_value_set((60000U * 32768U));&lt;br /&gt; nrf_wdt_reload_request_set(0);&lt;/p&gt;
&lt;p&gt;ret_val = nrf_bootloader_init(dfu_observer);&lt;br /&gt; APP_ERROR_CHECK(ret_val);&lt;/p&gt;
&lt;p&gt;The bootloader still resets into the application after 2 seconds.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What could I be missing here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reset into USB bootloader</title><link>https://devzone.nordicsemi.com/thread/206150?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2019 14:05:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:110fb3fb-da90-4b61-900b-7d01a5ac0559</guid><dc:creator>Ken A</dc:creator><description>&lt;p&gt;Never mind ... I realize now that the watchdog is still enabled through a soft reset. I added watchdog code to the bootloader application and now it stays in bootloader mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reset into USB bootloader</title><link>https://devzone.nordicsemi.com/thread/205949?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 16:26:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cd2c4dd-8627-45a8-b4a5-8c065a4e6401</guid><dc:creator>Ken A</dc:creator><description>&lt;p&gt;I added code to the bootloader in main(), before calling nrf_bootloader_init(),&lt;/p&gt;
&lt;p&gt;to blink LEDs in a certain pattern if&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(nrf_power_gpregret_get() &amp;amp; BOOTLOADER_DFU_START) is true.&lt;/p&gt;
&lt;p&gt;This proves that my application is setting BOOTLOADER_DFU_START correctly. However, the bootloader still jumps to the application.&lt;/p&gt;
&lt;p&gt;Interestingly, if I add the line&lt;/p&gt;
&lt;p&gt;nrf_power_gpregret_set(BOOTLOADER_DFU_START)&amp;nbsp;before calling nrf_bootloader_init(), the bootloader always stays in bootloader mode on reset.&lt;/p&gt;
&lt;p&gt;If it matters, I am using softdevice S140 for BLE functionality, and FSTORAGE_SD.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reset into USB bootloader</title><link>https://devzone.nordicsemi.com/thread/205740?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 05:53:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9efab2c8-e978-45d0-a0d5-4a6a4ca283d6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;If it&amp;#39;s possible to attach a debugger to your board I suggest that you open your bootloader project and place breakpoints in nrf_bootloader.c::dfu_enter_check()&amp;nbsp; to find out why the&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_GPREGRET isn&amp;#39;t returning true. I would also have checked if GPREGRET is set correctly.&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reset into USB bootloader</title><link>https://devzone.nordicsemi.com/thread/205656?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 13:58:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c0afdb3-cf9e-44cc-b7f3-d6def31ae843</guid><dc:creator>Ken A</dc:creator><description>&lt;p&gt;Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I followed your instructions, and it resets into the bootloader. The bootloader jumps immediately into the application. I want it to stay in the bootloader and wait for a firmware download even if t he application image is valid.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reset into USB bootloader</title><link>https://devzone.nordicsemi.com/thread/205345?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 13:40:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d017d22e-d650-40f7-b3ea-eac5c6b99b09</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_GREPRET must be set to &amp;#39;1&amp;#39; in the bootloader&amp;#39;s sdk_config.h&amp;nbsp;file for this to work. Also, note that you can&amp;#39;t access the&amp;nbsp;POWER registers directly if you have the Softdevice enabled in your application, it will lead to a softdevice assertion. Use the SD API&amp;nbsp;&lt;a title="sd_power_gpregret_set" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.1.1/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=3_4_3_1_2_7_2_16#ga62737e6515d380aa3eeba6582d061592"&gt;sd_power_gpregret_set&lt;/a&gt;() if it is enabled.&lt;/p&gt;
&lt;p&gt;You may also consider using the&amp;nbsp;&lt;a title="DFU Trigger Library (USB)" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_dfu_trigger_usb.html?cp=5_1_3_5_3"&gt;DFU Trigger Library (USB)&lt;/a&gt;. It&amp;#39;s compatible with our existing DFU tools and is integrated into the connectivity example (\examples\connectivity\ble_connectivity\pca10059).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>