<?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>Best way to Enter DFU Mode from software.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68181/best-way-to-enter-dfu-mode-from-software</link><description>Hi there, 
 
 I would like to set my dongle into DFU mode from software, I am using the USB-CDC-ACM class, and the softdevice as a central device. 
 Ideally I would send a command to the dongle and it will jump into reset and then go into DFU mode, the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Nov 2020 06:56:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68181/best-way-to-enter-dfu-mode-from-software" /><item><title>RE: Best way to Enter DFU Mode from software.</title><link>https://devzone.nordicsemi.com/thread/279844?ContentTypeID=1</link><pubDate>Fri, 13 Nov 2020 06:56:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39e17b21-5b42-4919-9709-cc5ebfe081f4</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Good to hear the success. Cheers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to Enter DFU Mode from software.</title><link>https://devzone.nordicsemi.com/thread/279824?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2020 21:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea99ff9c-e74f-4b23-8586-d3a4243fe9fd</guid><dc:creator>felan</dc:creator><description>&lt;p&gt;Hi Amanda,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your quick reply, I had a look at the library and found exactly what I needed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In my application in&amp;nbsp;cdc_acm_user_ev_handler.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When I receive a given command, I just clear the pin that is wired to the reset pin( BSP_SELF_PINRESET_PIN ) . and it effectively goes into bootloader mode so I can update the firmware without having to press the button.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to Enter DFU Mode from software.</title><link>https://devzone.nordicsemi.com/thread/279627?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2020 07:46:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1d97364-a5d7-4996-b158-3b6869d0d5c5</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Felipe,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The &lt;a title="USB DFU trigger library" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrf__dfu__trigger__usb.html?cp=7_1_6_10_6"&gt;USB DFU trigger library&lt;/a&gt; can be included in an application to allow the USB host to put the nRF52840 Dongle in DFU mode. This is for instance used in the Connectivity firmware that is used by the&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfconnect-ble"&gt;nRF Connect BLE app&lt;/a&gt;&lt;span&gt;. See the nRF5_SDK_17.0.2_d674dde_old\examples\connectivity\ble_connectivity\pca10059\ser_s140_usb_hci example,&amp;nbsp;where&amp;nbsp;nrf_dfu_trigger_usb_init() is called in&amp;nbsp;usbd_enable().&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="FelAn"]What would be the procedure to set the device to DFU mode from the application in the same way it does when the push button is pressed ?[/quote]
&lt;p&gt;The similar sentences in&lt;span&gt;&amp;nbsp;that&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;tutorial&lt;/a&gt;&lt;span&gt;&amp;nbsp;essentially &lt;/span&gt;mean that to enter DFU mode on the dongle you do a pin reset, which happens to be on the sideways button. It uses the&amp;nbsp;&lt;span&gt;PINRESET as one of the&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_bootloader.html#lib_bootloader_dfu_mode"&gt;methods to enter the bootloader&lt;/a&gt;&lt;span&gt;&amp;nbsp;(&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__nrf__bootloader__config.html#gaa89bea64482f2c4d83919922e5e84bc3"&gt;NRF_BL_DFU_ENTER_METHOD_PINRESET&lt;/a&gt;&lt;span&gt;). You can take a look at the&amp;nbsp;&lt;/span&gt;nRF5_SDK\examples\dfu\open_bootloader\pca10059_usb_debug, where t&lt;span&gt;he &lt;a title="Open Bootloader with DFU" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ble_sdk_app_open_bootloader.html?cp=7_1_4_4_2"&gt;Open Bootloader&lt;/a&gt;&amp;nbsp;is configured to enter DFU mode after pinresets by default (can be disabled in sdk_config.h). It detects this by reading out the POWER-&amp;gt;RESETREAS on boot.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to Enter DFU Mode from software.</title><link>https://devzone.nordicsemi.com/thread/279432?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 09:23:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:210ed5a9-bd6f-4181-9490-86708bf8bf02</guid><dc:creator>felan</dc:creator><description>&lt;p&gt;Hi Amanda,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for your quick repply, I have loaded the connectivity FW and I was able to set the dongle into dfu mode using nrfutil.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However I would like to implement the same in my own application, I have been looking into the connectivity FW coruce code but have not found yet, what the sequence would be to set the device into DFU mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What would be the procedure to set the device to DFU mode from the application in the same way it does when the push button is pressed ?&lt;/p&gt;
&lt;p&gt;Any other documentation that I could look at apart from&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;this&lt;/a&gt;, or an example?&lt;/p&gt;
&lt;p&gt;My application creates a VCP and I can send and receive commands using this COM port. Ideally on receiveing a given command the device should go into DFU mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers,&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to Enter DFU Mode from software.</title><link>https://devzone.nordicsemi.com/thread/279393?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 07:06:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6d94833-dabb-4fe8-a24d-b1a42b9f7af3</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user="FelAn"]The question I have is how to put the dongle in DFU mode by sending a command from the USB host ?&amp;nbsp;[/quote]
&lt;p&gt;As I previously replyed, you have to&amp;nbsp;&lt;span&gt;load the connectivity FW onto the dongle, and then refer to the flow and commeand in the&amp;nbsp;&lt;/span&gt;Programming an example using nrfutil section in the &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;tutorial&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to Enter DFU Mode from software.</title><link>https://devzone.nordicsemi.com/thread/279360?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 19:15:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16cb6ea2-3d06-41bf-b304-8117f2af44cd</guid><dc:creator>felan</dc:creator><description>&lt;p&gt;Hi Amanda,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It seems to me like this answer is not related to the actual question in this thread.&lt;/p&gt;
&lt;p&gt;The question I have is how to put the dongle in DFU mode by sending a command from the USB host ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Basically, having both options to set the DFU mode pushing the reset button and sending a command.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have checked in the SDK and have not found any examples on this matter.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any feedback on this is much appreciated.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to Enter DFU Mode from software.</title><link>https://devzone.nordicsemi.com/thread/279259?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 13:25:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbe77cc4-f8a9-490e-a15e-a62d384902a1</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The dongle can be used with nrfutil, but first, you need to load the connectivity FW onto the dongle. This is easiest done by launching the Bluetooth Low Energy app in nRF connect for desktop (&lt;/span&gt;&lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-desktop/Get-Started"&gt;link&lt;/a&gt;&lt;span&gt;) and click &amp;quot;yes&amp;quot; when it asks you to program the device.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2480.pastedimage1571917646221v1.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Check out:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>