<?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>not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46973/not-able-to-enter-dfu-mode-with-secure-bootloader-example</link><description>I am not able to enter DFU Mode with secure bootloader example. 
 I use IAR and NRF Connect with Programmer to flash 
 Following are the steps I followed 
 1. Build Secure bootloader for serial UART ( enabled NRF_DFU_DEBUG_VERSION to remove link error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 May 2019 09:21:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46973/not-able-to-enter-dfu-mode-with-secure-bootloader-example" /><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185882?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 09:21:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f1333e5-b128-46b5-bf18-0649b1a7fe1c</guid><dc:creator>Aadishri GS</dc:creator><description>[quote userid="78744" url="~/f/nordic-q-a/46973/not-able-to-enter-dfu-mode-with-secure-bootloader-example/185736"]I could not enable USB interface[/quote]
&lt;p&gt;The USB interface is seen only during Bootloader mode&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185869?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 08:53:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:409b3709-1867-417a-ad3c-174f8b3a44b2</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1. The debug bootloader projects support logging via RTT, so there is no conflict with UART. RTT logging requires you to use a J-Link debugger, such as the on-board debugger on the DK. The logs are automatically on when you use the debug bootloader, so you just need to start and connect the J-Link RTT Viewer application.&lt;/p&gt;
&lt;p&gt;2. The nRF52840 does not enable the USB automatically. It is like any other peripheral (such as UART) in the way that it has to be configured and enabled. It is always disabled by default. If you want to use it for DFU you need a USB bootloader that does this, for instance &amp;lt;SDK15.3&amp;gt;\\examples\dfu\secure_bootloader\pca10056_usb_debug\.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185736?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 12:48:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73b0d7da-f253-4275-b7ee-29adb7b556e0</guid><dc:creator>Aadishri GS</dc:creator><description>[quote userid="7377" url="~/f/nordic-q-a/46973/not-able-to-enter-dfu-mode-with-secure-bootloader-example/185732"] I don&amp;#39;t know exactly what you mean by seeing DFU in action[/quote]
&lt;p&gt;I meant going through the code while DFU is happening live (packet transfer etc). Is it possible? Like how we debug regular application...&lt;/p&gt;
&lt;p&gt;If you dont mind, I had a few more queries about logging and DFU&lt;/p&gt;
&lt;p&gt;1. If I enable UART logging, where will I see the logs? Coz, we already have the UART being used for DFU??&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;I could not enable USB interface (port labelled nRF USB next to Reset button on nRF52840 DK) for DFU. I tried both Win 7 and Win 10 PCs. The USB port is not even seen in Device manager. Any inputs?&lt;/p&gt;
&lt;p&gt;Thanks so much for your time&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185732?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 12:40:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a948ee8e-a6aa-43a8-ad42-3878b374f264</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;1. The difference between the debug bootloader and the &amp;quot;normal&amp;quot; is that is has RTT logging enabled, which increases the size. There are no additional steps for using this. You build and program it like the &amp;quot;normal&amp;quot; bootloader, but you can view the RTT log if you want to see what is going on. It is not related to debugging via a debugger. You can break in the bootloader if you like, but then you probably want to disable optimization. (In that case, you also have to move the start address of the bootloader as the size will increase.)&lt;/p&gt;
&lt;p&gt;2. I don&amp;#39;t know exactly what you mean by seeing DFU in action, but here will be extensive logging RTT through the DFU procedure when you use the debug bootloader. This gives a good understanding about what is happening, and can be used to track down most bootloader issues quite fast.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185729?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 12:27:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32c6c6c5-efa3-40cd-be10-ad2e4de728b3</guid><dc:creator>Aadishri GS</dc:creator><description>[quote userid="7377" url="~/f/nordic-q-a/46973/not-able-to-enter-dfu-mode-with-secure-bootloader-example/185710"]debug bootloader project[/quote]
&lt;p&gt;Can I debug with Step-into/over the code with this debug bootloader code?&lt;/p&gt;
&lt;p&gt;1. Can you kindly elaborate the steps? I cannot see these debug buttons enabled on IAR.&lt;/p&gt;
&lt;p&gt;2. Also, can I see the DFU in action with this code running in debug mode?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185719?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 12:10:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8c85813-848b-450e-b0a4-04105e5866d0</guid><dc:creator>Aadishri GS</dc:creator><description>&lt;p&gt;Also, LEDs 1 and 3 glow indicating the board has entered Bootloader mode&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185718?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 12:05:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9e44814-557c-4580-a7bc-3554ce117bb7</guid><dc:creator>Aadishri GS</dc:creator><description>&lt;p&gt;I just saw that the HW version was not matching. I made it to 0 in my bootloader code&amp;nbsp;and it successfully updated!!&lt;/p&gt;
&lt;p&gt;Below is the command I used:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Code\nRF_OriginalSDK\nRF5_SDK_15.3.0_59ac345_TRY\BUILDS\190503\dfu&amp;gt;&lt;strong&gt;nrfutil dfu serial -pkg dfu_test.zip -p COM5 -b 115200 -fc 1&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Traceback (most recent call last):&lt;br /&gt; File &amp;quot;C:\Python27\Scripts\nrfutil-script.py&amp;quot;, line 9, in &amp;lt;module&amp;gt;&lt;br /&gt; load_entry_point(&amp;#39;nrfutil==5.2.0&amp;#39;, &amp;#39;console_scripts&amp;#39;, &amp;#39;nrfutil&amp;#39;)()&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\click\core.py&amp;quot;, line 764, in __call__&lt;br /&gt; return self.main(*args, **kwargs)&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\click\core.py&amp;quot;, line 717, in main&lt;br /&gt; rv = self.invoke(ctx)&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\click\core.py&amp;quot;, line 1137, in invoke&lt;br /&gt; return _process_result(sub_ctx.command.invoke(sub_ctx))&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\click\core.py&amp;quot;, line 1137, in invoke&lt;br /&gt; return _process_result(sub_ctx.command.invoke(sub_ctx))&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\click\core.py&amp;quot;, line 956, in invoke&lt;br /&gt; return ctx.invoke(self.callback, **ctx.params)&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\click\core.py&amp;quot;, line 555, in invoke&lt;br /&gt; return callback(*args, **kwargs)&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\nordicsemi\__main__.py&amp;quot;, line 1042, in serial&lt;br /&gt; timeout)&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\nordicsemi\__main__.py&amp;quot;, line 956, in do_serial&lt;br /&gt; dfu.dfu_send_images()&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\nordicsemi\dfu\dfu.py&amp;quot;, line 129, in dfu_send_images&lt;br /&gt; self._dfu_send_image(self.manifest.application)&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\nordicsemi\dfu\dfu.py&amp;quot;, line 97, in _dfu_send_image&lt;br /&gt; self.dfu_transport.send_init_packet(data)&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 256, in send_init_packet&lt;br /&gt; self.__execute()&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 421, in __execute&lt;br /&gt; self.__get_response(DfuTransportSerial.OP_CODE['Execute'])&lt;br /&gt; File &amp;quot;c:\python27\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 502, in __get_response&lt;br /&gt; raise NordicSemiException(&amp;#39;Extended Error 0x{:02X}: {}&amp;#39;.format(resp[3], data))&lt;br /&gt;pc_ble_driver_py.exceptions.NordicSemiException: Extended Error 0x06: &lt;span style="text-decoration:underline;"&gt;&lt;em&gt;&lt;strong&gt;The hardware version of the device does not match the required hardware version for the update.&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Code\nRF_OriginalSDK\nRF5_SDK_15.3.0_59ac345_TRY\BUILDS\190503\dfu&amp;gt;&lt;strong&gt;nrfutil dfu serial -pkg dfu_test.zip -p COM5 -b 115200 -fc 1&lt;/strong&gt;&lt;br /&gt; [####################################] 100%&lt;br /&gt;Device programmed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Tips for those who face similar issues:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;1. The command I used to create package:&lt;/p&gt;
&lt;p style="padding-left:60px;"&gt;&lt;strong&gt;nrfutil pkg generate --hw-version 0 --sd-req 0x00 --application-version 1 --key-file private.key &amp;ndash;application blinky_pca10056_mbr_new.hex dfu_test.zip&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;2. T&lt;/strong&gt;he command I used to generate the bootloader_settings file:&lt;/p&gt;
&lt;p style="padding-left:60px;"&gt;&lt;strong&gt;nrfutil settings generate --family NRF52840 --application blinky_mbr.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 settings.hex&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;I have uploaded the updated secure bootloader hex with HW version 0 instead of the default 52 in the sdk_config.h&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/secure_5F00_bootloader_5F00_uart_5F00_mbr_5F00_pca10056.hex"&gt;devzone.nordicsemi.com/.../secure_5F00_bootloader_5F00_uart_5F00_mbr_5F00_pca10056.hex&lt;/a&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;3. I installed Python 2.7.11.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp; &amp;nbsp; 3.7&amp;nbsp;version &lt;em&gt;&lt;strong&gt;should not&lt;/strong&gt;&lt;/em&gt; be installed. nrfutil version was 5.2.0&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;4. Connect all UART Pins: RX 8, TX 6, CTS 7, RTS 5, GND and VCC&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;5. Don&amp;#39;t forget to add MBR and Booloader_settngs file apart from the app and booloader hex. Total 4 files&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;6. Use the new nRF Connect-Programmer&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-_2800_23_2900_.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185710?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 11:51:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18a17cad-454b-4616-9f3a-17728fbdb73b</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="Aadishri GS"]I use Secure bootloader and UART[/quote]
&lt;p&gt;Oh, yes. I don&amp;#39;t know how I failed to see that. In that case it should not be any problem.&lt;/p&gt;
[quote user=""]If I hold down button 4 and power-cycle, LEDs 1 and 3 are lit.After sometime, normal mode where app runs is entered and the app runs[/quote]
&lt;p&gt;How long is that time? The bootloader has an inactivity timeout and will reset and start the application if nothing happens for the specified duration of time. This is configured by&amp;nbsp;NRF_BL_DFU_INACTIVITY_TIMEOUT_MS in the bootloaders sdk_config.h, and the default value is&amp;nbsp;120000 ms (two minutes).&lt;/p&gt;
[quote user=""]1. How to enter DFU mode?[/quote]
&lt;p&gt;You can enter DFU mode by asserting a GPIO pin while resetting the device. You select which pin by setting&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN to the GPIO number you want in the bootloaders sdk_config.h. For the PCA10056 (nRF52840 DK) project, this is GPIO pin 25, which is connected to button 4.&lt;/p&gt;
[quote user=""]2. Is it OK to use nrf Connect programmer to program all at once[/quote]
&lt;p&gt;&amp;nbsp;Yes.&lt;/p&gt;
[quote user=""]3. How to enable RTT / UART logs on IAR? In the sdk_config file, I only see NRF_LOG_ENABLED. No macros related to UART / RTT[/quote]
&lt;p&gt;You should use the debug bootloader project which has RTT logging enabled by default. You can find it under &amp;lt;SDK&amp;gt;\examples\dfu\secure_bootloader\pca10056_uart_debug\. You cannot view the RTT log from IAR, but you can still build the project with IAR, and view the logs using J-Link RTT Viewer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185706?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 11:37:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7f7b043-1181-4aaa-8288-7139f98350f0</guid><dc:creator>Aadishri GS</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/190503.zip"&gt;devzone.nordicsemi.com/.../190503.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185703?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 11:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f7eda4f-1f73-4c61-8d56-17b35e180c4d</guid><dc:creator>Aadishri GS</dc:creator><description>&lt;p&gt;I use Secure bootloader and UART&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: not able to enter DFU Mode with secure bootloader example</title><link>https://devzone.nordicsemi.com/thread/185678?ContentTypeID=1</link><pubDate>Tue, 07 May 2019 10:24:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f83c349f-11da-4ca3-9a0b-0240a1a9d159</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You have not specified clearly which bootloader example and transport layer you use for DFU. Can you clarify? If you use the BLE bootloader, then you must also program the SoftDevice, which is used to handle BLE communication.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>